The rpmverify
command is a Linux utility that verifies the correctness of installed RPM packages. It checks whether the installed files match the original RPM package files’ checksums, permissions, and file types.
Overview
The syntax for using the rpmverify
command is as follows:
rpmverify [options] [package_name]
Where:
options
: specify the command’s behavior and modify its output.package_name
: specifies the name of the RPM package to verify. If no package name is specified, the command verifies all installed packages.
For example, to verify the correctness of the httpd
package, run the following command:
rpmverify httpd
Use Cases
- Verify the integrity of installed packages: The
rpmverify
command can be used to check whether the installed packages are intact and have not been tampered with. - Troubleshoot package issues: The command can help identify issues with installed packages, such as missing or modified files.
Examples
- Verify all installed packages:
rpmverify -a
- Verify all files in the
httpd
package:
rpmverify httpd
- Verify a specific file in the
httpd
package:
rpmverify -V /usr/sbin/httpd
Options
The following table lists the available options for the rpmverify
command:
Option | Description |
---|---|
-a |
Verify all installed packages. |
-V |
Verify a specific file or directory. |
-f |
Verify files that match a specified pattern. |
-p |
Verify a package file before installing. |
-R |
Verify files in a package that requires another package. |
-c |
Display only configuration files that have been modified. |
-d |
Display only documentation files that have been modified. |
-m |
Display only files that are not part of any package. |
-l |
Display only files with a mismatched MD5 checksum. |
-s |
Display only files with a mismatched file size. |
-g |
Display only files with a mismatched group ownership. |
-u |
Display only files with a mismatched user ownership. |
-g |
Display only files with a mismatched group ownership. |
-p |
Display only files with a mismatched permissions. |
Troubleshooting tips
- If the
rpmverify
command reports missing files, try reinstalling the package usingyum reinstall package_name
. - If the command reports modified files, check if any system changes were made that could have affected the package files.
Notes
- The
rpmverify
command only verifies files installed by RPM packages. It does not verify files installed by other means. - The command can be run with root privileges or with the
sudo
command.