pkginfo Command

Purpose

Displays software package and/or set information.

Syntax

To Display Information on Installed Packages

pkginfo [ -q] [ -x | -l] [ -r] [ -p | -i] [ -a Arch] [ -P Path ] [ -v Version] [ -c Category1,[Category2[, . . .]]] [ Pkginst [, Pkginst [, . . .]]]

To Display Information on Packages Contained in the Specified Device

pkginfo [ -d Device] [ -q] [ -x | -l] [ -a Arch] [ -P Path ] [ -v Version] [ -c Category1 [,Category2[, . . . ]]] [ PkginstPkginst [, Pkginst [, . . . ]]]

Description

pkginfo displays information about software packages or sets that are installed on the system (as requested in the first synopsis) or that reside on a directory (as requested in the second synopsis). A package is a collection of related files and executable that can be independently installed. A set is made up of a special-purpose package, referred to as a Set Installation Package (SIP), and a collection of one or more packages that are members of the set. The SIP controls the installation of the set.

When run without flags, pkginfo displays one line of information about every installed package (whether installed completely or partially) whose category is not the value "set". The information displayed includes the primary category, package instance, and name of the package. For UNIX software packages produced before UNIX System V Release 4, pkginfo displays only the package name and abbreviation.

The -p and -i flags are meaningless if used in conjunction with the -d flag. The -p and -i flags are mutually exclusive. The -x and -l flags are mutually exclusive.

Flags

Item Description
-q Enables quite mode - no information is displayed. This flag overrides the -x, -l, -p, and -i flags. (Can be invoked by a program to query whether or not a package has been installed.)
-x Extracts and displays the following information about the specified package: abbreviation, name, and, if available, architecture and version.
-l Displays a "long format" report (that is, one that includes all available information) about the specified package(s).
-r Lists the installation base for the specified package if the package is relocatable.
-p Displays information only for partially installed packages.
-i Displays information only for fully installed packages.
-a Arch Specifies the architecture of the package as Arch.
-P Path Displays information for packages installed in the alternative root directory path.
-v Version Specifies the version of the package as Version. All compatible versions can be requested by preceding the version name with a tilde "~".
-c Category . . . Displays information about packages that belong to category Category. (Categories are defined in the category field of the pkginfo file; see the pkginfo file format for details.) More than one category may be specified in a comma-separated list. A package is required to belong to only one category, even when multiple categories are specified. The package-to-category match is not case-sensitive.

If the category specified is "set", pkginfo displays information about Set Installation Packages (SIPs).

Pkginst Defines a short string used to designate an abbreviation for the package/set name. (The term "package instance" is used loosely: it refers to all instantiations of Pkginst, even those that do not include instance identifiers.)

To indicate all instances of a package, specify 'Pkginst.*', enclosing the command line in single quotes, as shown, to prevent the shell from interpreting the "*" character. Use the token "all" to refer to all packages available on the source medium.

If Pkginst is a SIP, information about the packages with which the SIP is associated is displayed.

-d Device Displays information from packages/sets that reside on Device. Device can be the full pathname to a directory (such as /var/tmp), or "-" which specifies packages in datastream format read from standard input. The default device is the installation spool directory (/var/spool/pkg).

Exit Status

This command returns the following exit values:
Item Description
0 Successful completion of script.
1 Fatal error. Installation process is terminated at this point.

Files

Item Description
/var/spool/pkg Default spool directory