Solaris: List Installed Packages with pkginfo

The pkginfo command in Solaris is capable of providing detailed information about the packages installed on a system. This tech-recipe describes some of its uses in listing numerous packages.


To list all packages installed on a Solaris system, use the following:

pkginfo
system SUNWsndmu Sendmail user
system SUNWsolnm Solaris Naming Enabler
system SUNWsprot Solaris Bundled tools
...

The output lists the category, the package name (like SUNWsprot), and a human readable name (Solaris Bundled Tools). The default categories are system and application, although additional categories can be used when making packages to simplify package management. To limit the categories displayed when listing packages, use the -c switch:

pkginfo -c application

The output of pkginfo will generally display pages of output, so it is convenient to pipe its output to more. When looking for a specific package, use pkgadd with the grep command to search for the name of the package or a part of its human readable name. Note the example below:

pkginfo | grep SUNWsndmu
pkginfo | grep -i sendmail

The latter example uses the -i switch to make grep case insensitive, matching upper or lower case.

 

About Quinn McHenry

Quinn was one of the original co-founders of Tech-Recipes. He is currently crafting iOS applications as a senior developer at Small Planet Digital in Brooklyn, New York.
View more articles by Quinn McHenry

The Conversation

Follow the reactions below and share your own thoughts.