Product SiteDocumentation Site

4.4.2. 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 rpm -V command will also report missing dependencies.
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/
In this example, the c and d stand for configuration and documentation files, respectively.
Note 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
File size differs.
File mode differs.
The MD5 checksum differs.
The major and minor version numbers differ on a device file.
A mismatch occurs in a link.
The file ownership differs.
The file group owner differs.
The file time (mtime) differs.