Solaris 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.



pkg-get configuration

First, 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:

A list of Sunfreeware mirrors is available here.

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

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

Back to
Last modified: 2008/10/31