INFOPKG(8) System Manager's Manual INFOPKG(8)

infopkg — query the package database

infopkg [-r root] -i

infopkg [-r root] -l package | file

infopkg [-r root] -o regex

infopkg -f file

infopkg -h | -v

infopkg reads the package database, or a package archive, and prints what it finds. Exactly one of -f, -i, -l and -o must be given.

The options are as follows:

file
Print the footprint of the package archive file. The database is not used.
Print a usage summary.
List the installed packages with their versions, sorted by name.
package | file
List the files of the installed package package. If no such package is installed, list the files in the package archive file.
regex
List the installed files matching the extended regular expression regex, with the package that owns each. Paths are matched with a leading ‘/’. If nothing matches, “no owner found” is printed.
root
Use the database under root instead of /.
Print the version.

Root if -r is not given.
Package database directory; see addpkg(8).

/var/lib/pkg/db
Package database.

The infopkg utility exits 0 on success, and >0 if an error occurs. Finding no owner with -o is not an error.

Which package owns /bin/ls?

$ infopkg -o '^/bin/ls$'

List the files in a package archive:

$ infopkg -l 'nftables#1.1.5-1.pkg.tar.gz'

addpkg(8), delpkg(8), pkg(8)

September 27, 2026 mkpkg 1.6.0