JavaScript is required to for searching.
Skip Navigation Links
Exit Print View
Adding and Updating Oracle Solaris 11 Software Packages     Oracle Solaris 11 Information Library
search filter icon
search icon

Document Information


1.  Introduction to the Image Packaging System

2.  IPS Graphical User Interfaces

3.  Getting Information About Software Packages

Showing Package Install State Information

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

Searching for Packages

Identifying Which Package Delivers a Specific File

Listing Packages By Category

Showing Dependent Packages

Listing All Packages In a Group Package

4.  Installing and Updating Software Packages

5.  Configuring Installed Images

Showing Information From the Package Manifest

The pkg contents command displays the file system content of packages. With no options or operands, this command displays path information for all packages that are installed in the current image. Use command options to specify particular package content to display. To narrow your results, provide one or more package names. You can use wildcards in the package names.

/usr/bin/pkg contents [-Hmr] [-a attribute=pattern ...] [-g path_or_uri ...]
    [-o attribute ...] [-s sort_key] [-t action_type ...] [pkg_fmri_pattern ...]

Both the contents and search subcommands query the contents of packages. The pkg contents command displays actions and attributes of packages. The pkg search command lists the packages that match the query.

The following example shows the pkg contents default behavior. Use options to specify which actions and attributes to display.

$ pkg contents e1000g

The -m option displays the entire package manifest.

The -r option displays the newest available versions, retrieving information for any packages not currently installed from the repositories of the configured publishers.

Use the -g option to specify the repository or package archive to use as the source of package data for the operation.

Use the -s option to sort actions by the specified action attribute. By default, output is sorted by path or by the first attribute specified by the -o option. The -s option can be specified multiple times.

Listing Files Installed By a Package

Use the -t option to specify the type of actions to display. You can specify multiple types in a comma-separated list, or you can specify the -t option multiple times.

Use the -o option to specify the attributes to display in the output. You can specify multiple attributes in a comma-separated list, or you can specify the -o option multiple times. See the pkg(5) man page for a list of package actions and attributes. In this example, the pkg.size pseudo attribute shows the size of the file; the file action does not have a size attribute.

# pkg contents -t file -o owner,group,mode,pkg.size,path e1000g
root  sys   0755   420912 kernel/drv/amd64/e1000g
root  sys   0644     4238 kernel/drv/e1000g.conf
root  bin   0444       20 usr/share/man/man7d/e1000.7d
root  bin   0444    12813 usr/share/man/man7d/e1000g.7d

If you view the package manifest, you see that the e1000g package has seven file actions. The three that are not shown in the above output are files that cannot be installed in this image. This image is an x86 architecture, and does not include debug files. The debug file for the x86 architecture is not shown above, and neither the debug nor the non-debug file is shown for the SPARC architecture. You can change whether an image includes debug files by changing the debug image variant. See Controlling Installation of Optional Components.

Listing All Installable Packages In a Group Package

The Oracle Solaris 11 GUI installer installs the solaris-desktop group package. The text installer and the default AI manifest in an Automated Installer installation install the solaris-large-server group package. The solaris-small-server group package is an alternative you can use to install a smaller set of packages on a server. You can use the following command to display the set of packages that is included in each group.

$ pkg contents -o fmri -H -rt depend -a type=group solaris-desktop

The -t option matches depend actions in the package. The -a option matches the depend actions that are type group. The -o option displays only the fmri attribute of the group depend action.

Displaying License Requirements

This example displays all the incorporation packages that require you to accept the package license.

$ pkg contents -rt license -a must-accept=true \
-o must-accept,must-display,license, *incorporation
true        true         usr/src/pkg.license_files/lic_OTN consolidation/osnet/osnet-incorporation