pkginfo
Display information about installed packages
TLDR
List installed packages and their versions
List files owned by a package
List the owner(s) of files matching a pattern
Print the footprint of a file
SYNOPSIS
pkginfo [ -d device ] [ -q ] [ -l | -x ] { -r | pkginst }
pkginfo [ -i ] [ -d device ] [ -q ] [ -l | -x ] pkginst
pkginfo [ -c category ] [ -a arch ] [ -v version ] [ -q ] [ -l | -x ] [ pkginst ]
pkginfo [ -p ] [ -q ] [ -l | -x ] pkginst
PARAMETERS
-d device
Specifies the device or directory where packages are stored, e.g., a CD-ROM or a download directory. Useful for querying packages on an installation medium.
-q
Quiet mode. Suppresses the output of all messages except for error messages. This is particularly useful for scripting when only the exit status is needed.
-l
Displays a long format listing of package information, including more detailed attributes like category, vendor, installation date, and full description.
-x
Displays an extracted format listing of package information. This is a concise, colon-separated list of basic package attributes (e.g., abbreviation, full name, architecture, version, category).
-r
Displays information about relocatable packages that are installed in a non-default root path. This option must be used with a specified pkginst or the -d option.
-i
Displays information about the package on the installation medium (device) rather than an already installed package on the system. Requires a pkginst.
-c category
Filters packages by a specific category, e.g., 'system', 'application', or 'utility'. This allows narrowing down the search to specific types of software.
-a arch
Filters packages by a specific architecture, e.g., 'sparc', 'i386', 'x86_64'. This is useful in multi-architecture environments.
-v version
Filters packages by a specific version string. This helps in locating specific package releases.
-p
Allows pkginst to be a partial match, displaying information for all packages whose abbreviation matches the given pattern. Wildcards are often supported.
pkginst
The name of the package instance(s) to query. Can be a specific package abbreviation (e.g., 'SUNWbash'), the keyword 'all' for all installed packages, or 'category.all' for all packages within a specific category.
DESCRIPTION
pkginfo is a command-line utility used to display information about installed software packages. It is part of the System V Release 4 (SVR4) package management system, commonly found on Unix-like operating systems such as Solaris, HP-UX, and some older Linux distributions that utilize this packaging standard.
The command allows users to query the package database for details like package name, architecture, version, category, vendor, description, installation date, and status. It supports various output formats, including a concise "extracted" view and a verbose "long" listing, providing comprehensive details about a package's attributes.
pkginfo is essential for system administrators and users to verify installed software, troubleshoot package issues, or simply gain insights into the system's software inventory.
CAVEATS
pkginfo is not a standard command on most modern Linux distributions (e.g., Debian, Ubuntu, Fedora, RHEL, CentOS, Arch Linux). These distributions primarily use different package management systems like dpkg/apt (Debian-based) or rpm/yum/dnf (Red Hat-based).
It is primarily associated with System V Release 4 (SVR4) package management, historically found on systems like Solaris, HP-UX, and specific older or specialized Linux environments (e.g., SCO OpenServer).
To use pkginfo, packages must have been installed using the pkgadd utility, which adheres to the SVR4 packaging standard.
OUTPUT FORMATS
pkginfo offers various output formats. The long (-l) format provides a comprehensive list of attributes for each package, including detailed descriptions, installation paths, and dependencies. The extracted (-x) format offers a more concise, colon-separated output, useful for scripting or quick overviews. The default output provides basic information like package abbreviation and full name.
PACKAGE INSTANCE SPECIFICATION
You can specify packages using their unique abbreviation (e.g., 'SUNWcs'). Using the keyword 'all' retrieves information for all installed packages. You can also query for packages belonging to a specific category (e.g., 'system.all') or use partial matching with the -p option to find packages that match a pattern.
HISTORY
The pkginfo command, along with the entire System V Release 4 (SVR4) package management framework (including pkgadd, pkgrm, pkgchk), was developed as part of AT&T's UNIX System V Release 4 in the late 1980s. It provided a standardized approach to software packaging, installation, and management across different SVR4-compliant UNIX systems.
While widely adopted on systems like Solaris, HP-UX, and SCO OpenServer, its direct usage on mainstream Linux distributions became less common as rpm (Red Hat Package Manager) and dpkg (Debian Package Manager) emerged and became the dominant packaging standards for the open-source Linux ecosystem. However, its design principles influenced subsequent package management systems.