Next: 4.1.6.1 OPTIONS for information
Up: 4.1 Red Hat Package
Previous: 4.1.5 Removing Packages with
 
Contents
You can query RPMs for information about the packages and you can
query the rpm database about files on the system. The general form
of an rpm query is:
rpm -q {query-options]
Some of the more popular forms are;
To find out the contents of a package, or which files and where they
were put on the system.
rpm -qpl <package_file>
To query a file to find out what package it came from.
rpm -qf <file_name>
There are many options for querying packages and the database.
- -a
- Query all installed packages
- -whatrequires
- <capability> Query all packages that requires <capability>
for proper functioning.
- -whatprovides
- <virtual> Query all packages that provide the <virtual>
capability.
- -f
- <file> Query package owning <file>.
- -requiredby
- <package> Query all of the package which contain triggers
scripts that are triggered by <package>.
- -p
- <package_file> Query an (uninstalled) package <package_file>.
The <package_file> may be specified as an ftp style URL, in which
case the package header will be down- loaded and queried. See FTP
Subsections
Next: 4.1.6.1 OPTIONS for information
Up: 4.1 Red Hat Package
Previous: 4.1.5 Removing Packages with
 
Contents