Datasheet
“main” (Installation and Administration) — 2004/6/25 — 13:29 — page 178 — #204
i
i
i
i
i
i
i
i
Which patches are already installed in the system and for which
package versions?
A list of all patches installed in the system can be displayed with the
command rpm -qPa. If only one patch is installed in a new system
(as in this example), the list appear as follows:
rpm -qPa
pine-4.44-224
If, at a later date, you want to know which package version was origi-
nally installed, this information is also available in the RPM database.
For pine, this information can be displayed with the following com-
mand:
rpm -q --basedon pine
pine = 4.44-188
More information, including information about the patch feature of RPM, is
available in man rpm and in man rpmbuild.
5.3.4 RPM Queries
With the -q option, rpm initiates queries, making it possible to inspect
an RPM archive (by adding the option -p) and also to query the RPM
database of installed packages. Several switches are available to specify the
type of information required (see Table 5.2).
Table 5.2: The Most Important RPM Query Options
-i Package information
-l File list
-f hFILEi Query a package owned by hFILEi (the full path
must be specified with hFILEi)
-s File list with status information (implies -l)
-d List only documentation files (implies -l)
-c List only configuration files (implies -l)
--dump File list with complete details (to be used with
-l, -c, or -d)
178 5.3. RPM — the Package Manager










