There are several ways to verify packages installed on your system. If you have taken a look at RPM's query command,
you will find that many of them are similar. Let us start with the simplest method of specifying packages, namely the package label.
You can simply follow the rpm -V command with all or part of a package label. As with every other RPM command that accepts package labels, you will need to carefully specify each part of the label you include.
Keep in mind that package names are case-sensitive, so rpm -V PackageName and rpm -V packagename are not the same. Let us verify the initscripts package:
# rpm -V initscripts
#
While it looks like RPM did not do anything, the following steps were performed:
- For every file in the package, RPM checked the nine file attributes that were discussed above.
- If the package was built with dependencies, the RPM database was searched to ensure the packages that satisfy those dependencies were installed.
- If the package was built with a verification script, that script was executed.
In our example, each of these steps was performed without erro and the package verified successfully.
Remember, with
rpm -V
you will only see output if a package fails to verify.