PKG_INFO(1)                OpenBSD Reference Manual                PKG_INFO(1)

NAME
     pkg_info - display information on software packages

SYNOPSIS
     pkg_info [-AaCcdfIKLMmPqRSstUv] [-E filename] [-e pkg-name] [-l str]
              [-Q query] [pkg-name] [...]

DESCRIPTION
     The pkg_info command is used to dump out information for packages, as
     created by pkg_create(1), which may be still packed up or already in-
     stalled on the system with the pkg_add(1) command.

     The pkg-name may be the name of an installed package, the pathname to a
     package distribution file, or a URL to a package available through FTP,
     HTTP, HTTPS, or SCP.  pkg_info will try to complete pkg-name with a ver-
     sion number while looking through installed packages.

     When browsing through uninstalled packages, running pkg_info -I *.tgz
     will report a summary line for each package, so that it is possible to
     run pkg_info pkgname.tgz to obtain a longer package description, and
     pkg_add -n pkgname.tgz to check that the installation would proceed
     cleanly, including dependencies.

     The following command-line options are supported:

     -A      Show information for all currently installed packages, including
             internal packages.

     -a      Show information for all currently installed packages.

     -C      Show certificate information for signed packages.

     -c      Show the one-line comment field for each package.

     -d      Show the long-description field for each package.

     -E filename
             Look for the package(s) that contains the given filename.

     -e pkg-name
             This option allows you to test for the presence of another (per-
             haps prerequisite) package from a script.  If the package identi-
             fied by pkg-name is currently installed, return 0, otherwise re-
             turn 1.  In addition, the names of any package(s) found installed
             are printed to stdout unless turned off using the -q option.

             The given pkg-name is actually a package specification, as de-
             scribed in packages-specs(7).  For example, pkg_info -e
             'name->=1.3' will match versions 1.3 and later of the name pack-
             age.

     -e pkg-path
             Another variant of this option that uses a package path instead.
             A package path is a location within the ports tree, as described
             in FULLPKGPATH in bsd.port.mk(5).  For example, pkg_info -e
             x11/kde/base3 will match any package that was compiled according
             to ${PORTSDIR}/x11/kde/base3.

     -f      Show the packing list instructions for each package.

     -I      Show the index entry for each package.

     -K      Prefix file names with category keyword (e.g., @file, @lib).  Al-
             ways used together with -L.

     -L      Show the files within each package.  This is different from just
             viewing the packing list, since full pathnames for everything are
             generated.

     -l str  Prefix each information category header (see -q) shown with str.
             This is primarily of use to front-end programs that want to re-
             quest a lot of different information fields at once for a pack-
             age, but don't necessarily want the output intermingled in such a
             way that they can't organize it.  This lets you add a special to-
             ken to the start of each field.

     -M      Show the install-message file (if any) for each package.

     -m      Only show packages tagged as manual installations.  It should
             omit anything installed automatically as a dependency.

     -P      Show the pkgpath for each package.  You can easily build a sub-
             dirlist with this.

     -Q query
             Show all packages in $PKG_PATH which match the given query.

     -q      Be ``quiet'' in emitting report headers and such, just dump the
             raw info (basically, assume a non-human reading).

     -R      Show which packages require a given package.

     -S      Show the package signature for each package.  This signature is a
             unique tag showing the package name, and the version number of
             every run time dependency and shared library used to build this
             package.

     -s      Show an estimate of the total size of each package.

     -t      Show packages which are not required by any other packages.

     -U      Show the deinstall-message file (if any) for each package.

     -v      Turn on verbose output.

ENVIRONMENT
     PKG_DBDIR   The standard package database directory, /var/db/pkg, can be
                 overridden by specifying an alternative directory in the
                 PKG_DBDIR environment variable.

     PKG_PATH    This can be used to specify a colon-separated list of paths
                 to search for package files.  The current directory is always
                 searched first, even if PKG_PATH is set.  If PKG_PATH is
                 used, the suffix ``.tgz'' is automatically appended to the
                 pkg-name, whereas searching in the current directory uses
                 pkg-name literally.

     PKG_TMPDIR  Temporary area where package information files will be ex-
                 tracted, instead of /var/tmp.

TECHNICAL DETAILS
     Package info is either extracted from package files named on the command
     line, or from already installed package information in /var/db/pkg/<pkg-
     name>.

SEE ALSO
     pkg_add(1), pkg_create(1), pkg_delete(1), bsd.port.mk(5), package(5),
     packages-specs(7)

AUTHORS
     Jordan Hubbard
             initial design
     Marc Espie
             complete rewrite

OpenBSD 4.7                    January 11, 2010                              3
