rpm -qcommand to query the database of installed packages. The
rpm -q foocommand displays the package name, version, and release number of the installed package
To query a package, replace
foowith the actual package name.
Instead of specifying the package name, use the following options with
-qto specify the package(s) you want to query. These are called Package Selection Options.
-aqueries all currently installed packages.
-fqueries the package which owns
<file>. When specifying a file, you must specify the full path of the file (for example,
-pqueries the package
There are a number of ways to specify what information to display about queried packages. The following options are used to select the type of information for which you are searching. These are called Information Query Options.
-idisplays package information including name, description, release, size, build date, install date, vendor, and other miscellaneous information.
-ldisplays the list of files that the package contains.
-sdisplays the state of all the files in the package.
-ddisplays a list of files marked as documentation (man pages, info pages, READMEs, etc.).
-cdisplays a list of files marked as configuration files. These are the files you change after installation to adapt the package to your system (for example,
For the options that display lists of files, add
-vto the command to display the lists in a familiar