Skip Navigation Links | |
Exit Print View | |
Adding and Updating Oracle Solaris 11.1 Software Packages Oracle Solaris 11.1 Information Library |
1. Introduction to the Image Packaging System
2. IPS Graphical User Interfaces
3. Getting Information About Software Packages
Displaying Package Descriptions or Licenses
Showing Information from the Package Manifest
Listing Files Installed by a Package
Listing All Installable Packages in a Group Package
Displaying License Requirements
Identifying Which Package Delivers a Specific File
Showing Which Packages Provide Which SMF Services
Listing All Packages in a Group Package
The pkg list command tells you whether a package is installed in the current image and whether an update is available. With no options or operands, this command lists all packages that are installed in the current image. To narrow your results, provide one or more package names. You can use wildcards in the package names. Quote the wildcards so that the argument is passed directly to pkg and the shell does not expand it. Package variants for an architecture or zone type that does not match this image are not listed.
/usr/bin/pkg list [-Hafnsuv] [-g path_or_uri ...] [--no-refresh] [pkg_fmri_pattern ...]
The pkg list command displays one line of information for each package.
$ pkg list '*toolkit' NAME (PUBLISHER) VERSION IFO isvtoolkit (isvpub) 1.0 i-- system/dtrace/dtrace-toolkit 0.99-0.175.1.0.0.21.0 i--
The publisher name in parentheses indicates that the isvpub publisher is not the first publisher in the publisher search order in this image. The dtrace-toolkit package that is installed in this image is published by the publisher that is the first publisher in the search order.
The “i” in the I column indicates that these packages are installed in this image. To list packages that are installed and the newest versions of packages that are not installed but could be installed in this image, use the -a option.
$ pkg list -a '*toolkit' NAME (PUBLISHER) VERSION IFO image/nvidia/cg-toolkit 3.0.15-0.175.1.0.0.14.0 --- isvtoolkit (isvpub) 1.0 i-- system/dtrace/dtrace-toolkit 0.99-0.175.1.0.0.21.0 i--
This output indicates that the image/nvidia/cg-toolkit package can be installed in this image.
To list all matching packages, including packages that cannot be installed in this image, use the -af option. To list only the newest versions of these packages, specify @latest.
$ pkg list -af '*toolkit@latest' NAME (PUBLISHER) VERSION IFO developer/dtrace/toolkit 0.99-0.173.0.0.0.1.0 --r image/nvidia/cg-toolkit 3.0.15-0.175.1.0.0.14.0 --- isvtoolkit (isvpub) 1.0 i-- system/dtrace/dtrace-toolkit 0.99-0.175.1.0.0.21.0 i--
This output indicates that the developer/dtrace/toolkit package cannot be installed in this image. The “r” in the O column indicates that this package has been renamed. The developer/dtrace/toolkit package has been renamed to system/dtrace/dtrace-toolkit, and system/dtrace/dtrace-toolkit is already installed.
In the following example, the web/amp package has been renamed to group/feature/amp. If you specify the command to install the web/amp package, the group/feature/amp package is installed automatically.
$ pkg list -a amp NAME (PUBLISHER) VERSION IFO group/feature/amp 0.5.11-0.175.0.0.0.21.0 --- web/amp 0.5.11-0.174.0.0.0.0.0 --r
The pkg list command does not tell you the new name of a renamed package. In the previous examples, the pattern given as input to the pkg list command happened to match both the old and new names, and an inference could be drawn. In general, to display the new name of a renamed package, use the pkg info command as shown in Displaying Package Descriptions or Licenses.
The -n option lists the newest version of each known package. An “o” in the O column indicates that the package is obsolete. You cannot install a package that is obsolete.
$ pkg list -n '*mysql-5?' NAME (PUBLISHER) VERSION IFO database/mysql-50 5.0.91-0.171 --o database/mysql-51 5.1.37-0.175.1.0.0.21.0 ---
This output indicates that the database/mysql-50 package cannot be installed in this image. This package has not been renamed. If you specify the command to install the mysql-50 package, the mysql-51 package is not installed. No packages are installed in this case.
An “f” in the F column indicates the package is frozen. If a package is frozen, you can only install or update to packages that match the frozen version. See Locking Packages to a Specified Version for information about freezing packages.
$ pkg list mercurial NAME (PUBLISHER) VERSION IFO developer/versioning/mercurial 2.2.1-0.175.1.0.0.21.0 if-
The -s option lists only the package name and summary.
$ pkg list -ns mysql-51 feature/amp NAME (PUBLISHER) SUMMARY database/mysql-51 MySQL 5.1 Database Management System group/feature/amp AMP (Apache, MySQL, PHP) Deployment Kit for Oracle Solaris
The -v option lists the full package FMRI.
$ pkg list -nv mysql-51 FMRI IFO pkg://solaris/database/mysql-51@5.1.37,5.11-0.175.1.0.0.21.0:20120723T165236Z ---
The -u option lists all installed packages that have newer versions available.
$ pkg list -u 'compress/*' NAME (PUBLISHER) VERSION IFO compress/bzip2 1.0.6-0.175.1.0.0.19.0 i-- compress/gzip 1.4-0.175.1.0.0.19.0 i-- compress/p7zip 9.20.1-0.175.1.0.0.19.0 i-- compress/unzip 6.0-0.175.1.0.0.19.0 i-- compress/zip 3.0-0.175.1.0.0.19.0 i--
Note - The number of packages that have newer versions available in the package repository might be larger than the number of packages that could be updated in this image. Packages can only be updated to versions allowed by the constraints imposed on the image by installed package dependencies and publisher configuration. To determine what packages can be updated in this image, use pkg update -nv.
Use the -g option to specify the repository or package archive to use as the source of package data for the operation.
When you use the --no-refresh option, pkg does not attempt to contact the repositories for the image's publishers to retrieve the newest list of available packages.