next up previous contents index
Next: 7.2.5 Verifying Up: 7.2 Using RPM Previous: 7.2.3 Upgrading

7.2.4 Querying

 

Querying the database of installed packages is accomplished with rpm -q. A simple use is rpm -q foo which will print the package name, version, and release number of the installed package foo:

$ rpm -q foo
rpm-2.0-1

Instead of specifying the package name, you can use the following options with -q to specify what package(s) you want to query. These are called Package Specification Options.

There are a number of ways to specify what information to display about queried packages. The following options are used to select the information you are interested in. These are called Information Selection Options.

For those options that display file lists, you can add -v to your command line to get the lists in a familiar ls -l format.



Red Hat Software