Register a domain and help support LQ
Go Back > Blogs > Kashif Aziz Awan
User Name


Rate this Entry

Install & Update packages (Solaris-9) How to

Posted 04-28-2011 at 05:50 AM by kashifazizawan

Distribution: Solaris-9
System: X86
Date: January 23, 2011
Author: Kashif Aziz Awan
Version: 5.9 Generic

download package to
and run the commands

$cd /var/spool/pkg
$pkgadd package_name-pkg
Package will be installed.
Package installation through pkg-get:
The Solaris pkg-get utility simplifies retrieval and installation of Solaris packages from repositories such as Sunfreeware. The tool is similar to Debian's apt-get, although pkg-get repositories have to be configured to support dependencies. The Community Software Packages site at supports dependencies; Sunfreeware does not.
How pkg-get Works
Pkg-get connects to an online software repository,
such as or, and downloads a list of
all available software for the specific version of Solaris installed on your
You specify which application you want to install and
pkg-get will download and install the correct version of this application,
along with any pre-requisites and other dependencies.
Anything pkg-get installs can be easily and safely
backed out using pkgrm.
Installing pkg-get
1.Check on your Solaris server if /opt/csw/bin/pkg-get
exists. If it does, then you already have pkg-get installed on your
2.Download the pkg-get package from
and put it in /tmp on your Solaris machine.
3.Type: pkgadd –d /tmp/pkg_get.pkg and answer “yes”
to all prompts.


pkg-get configuration
1.Edit the /opt/csw/etc/pkg-get.conf file and add the
following lines:
export http_proxy ftp_proxy
1.Run /opt/csw/bin/pkg-get –U to update the software
copy pkg-get's configuration file from /opt/csw/etc.

# cp /opt/csw/etc/pkg-get.conf /etc

I prefer to use the Sunfreeware repository instead of the default CSW repository, so I make the following change in /etc/pkg-get.conf:

# default site, in USA:

# default site, in USA:

Or more mirrors

pkg-get commands
Update list of available packages (retrieve latest list):
pkg-get -U

List available packages (uses last downloaded copy):
pkg-get -a

Download (do not install) package:
pkg-get -d package

Download and install package:
pkg-get -i package

Download & Install all software available:
pkg-get install all

Upgrade package:
pkg-get -u package

Upgrade all installed packages:
pkg-get -u

Note: if multiple versions of a package are available, specify the version number with a hyphen.


$ pkg-get -a | grep lsof
lsof 4.33
lsof 4.68

# pkg-get install lsof-4.68

Uninstalling Software Installed by pkg-get
You can use pkgrm to uninstall any or all software
installed with pkg-get. Here’s an example of how to uninstall Ethereal:
1.All packages installed by pkg-get will begin with
the “CSW” string. You can list all packages installed by pkg-get
by running this command: pkginfo | grep CSW
2.In this example, Ethereal package is called CSWethereal.
So to remove it, simply do: pkgrm CSWethereal
3.This is a standard Solaris way of uninstalling software.
It does not involve running pkg-get.
Posted in Uncategorized
Views 2042 Comments 0
« Prev     Main     Next »
Total Comments 0




All times are GMT -5. The time now is 11:18 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration