Product SiteDocumentation Site

4.4. Verifying Installed RPM Packages

You can do a lot more than just query packages in the RPM database. You can ask the rpm command to verify packages with the -V (or --verify) option.
The basic syntax is:
rpm -V verify_options package_name
For example:
# rpm -V telnet
#
If everything checks out, you'll get no response. The rpm command reports problems only. For example, if you have an installation of the telnet-server package that is missing some files, the rpm -V command will let you know, as shown following:
# rpm -V telnet-server
missing c /etc/xinetd.d/telnet
missing /usr/sbin/in.telnetd
missing d /usr/share/man/man5/issue.net.5.gz
In this example, the c and d stand for configuration and documentation files, respectively.
Note
The rpm -V command will also report missing dependencies.

4.4.1. Verifying your entire system

To verify your entire system, use the -a option.
For example:
# rpm -Va
SM5....T c /usr/share/info/dir
.......T c /etc/krb5.conf
.......T /usr/share/pixmaps/gnome-default-dlg.png
.......T /usr/share/pixmaps/gnome-error.png
.......T /usr/share/pixmaps/gnome-info.png
.......T /usr/share/pixmaps/gnome-question.png
.......T /usr/share/pixmaps/gnome-warning.png
S.5....T c /etc/sysconfig/pcmcia
.....U.. /dev/winradio0
Each line that the rpm command outputs indicates a problem with the given file. The rpm command uses letter codes to show the type of the problem. Table 5-8 lists the letter codes with their meanings.
Table 5-8 RPM verify output codes
Code
Meaning
S
File size differs.
M
File mode differs.
5
The MD5 checksum differs.
D
The major and minor version numbers differ on a device file.
L
A mismatch occurs in a link.
U
The file ownership differs.
G
The file group owner differs.
T
The file time (mtime) differs.