LinuxCommandLibrary

pkginfo

pkginfo

TLDR

List installed packages and their versions

$ pkginfo -i
copy


List files owned by a package
$ pkginfo -l [package]
copy


List the owner(s) of files matching a pattern
$ pkginfo -o [pattern]
copy


Print the footprint of a file
$ pkginfo -f [path/to/file]
copy

SYNOPSIS

pkginfo [options] path ...

DESCRIPTION

Print the metadata for one or more Python package distributions.

Each 'path' entry can be one of the following:

- a source distribution: in this case, 'path' should point to an existing archive file (.tar.gz, .tar.bz2, or .zip) as generated by 'setup.py sdist'.

- a binary distribution: in this case, 'path' should point to an existing archive file (.egg)

- a "develop" checkout: in this case, 'path' should point to a directory initialized via 'setup.py develop' (under setuptools).

- an installed package: in this case, 'path' should be the importable name of the package.

OPTIONS

-h, --help

show help message and exit

-m METADATA_VERSION, --metadata-version=METADATA_VERSION

Override metadata version

-f FIELDS, --field=FIELDS

Specify an output field (repeatable)

-d DOWNLOAD_URL_PREFIX, --download-url-prefix=DOWNLOAD_URL_PREFIX

Download URL prefix

--simple

Output as simple key-value pairs

-s, --skip

Skip missing values in simple output

-S, --no-skip

Don't skip missing values in simple output

--single

Output delimited values

--item-delim=ITEM_DELIM

Delimiter for fields in single-line output

--sequence-delim=SEQUENCE_DELIM

Delimiter for multi-valued fields

--csv

Output as CSV

--ini

Output as INI

SEE ALSO

The full documentation for pkginfo is available in /usr/share/doc/python-pkginfo-doc/html if the python-pkginfo-doc package is installed

Copied to clipboard