infopkg — query
the package database
infopkg |
[-r root]
-l package |
file |
infopkg |
[-r root]
-o regex |
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:
-f
file
- Print the footprint of the package archive file. The
database is not used.
-h
- Print a usage summary.
-i
- List the installed packages with their versions, sorted by name.
-l
package | file
- List the files of the installed package package. If
no such package is installed, list the files in the package archive
file.
-o
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.
-r
root
- Use the database under root instead of
/.
-v
- Print the version.
- /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'