Bootstrap FreeKB - RPM - Verify the integrity of RPM Database Packages using rpmdb_verify
RPM - Verify the integrity of RPM Database Packages using rpmdb_verify

Updated:   |  RPM articles

On some Red Hat distributions (CentOS, Fedora, Red Hat), the /usr/lib/rpm/rpmdb_verify command line tool can be used to determine there are any issues with the RPM database Packages file.

~]$ /usr/lib/rpm/rpmdb_verify /var/lib/rpm/Packages
BDB5105 Verification of /var/lib/rpm/Packages succeeded.

 

If the rpmdb_verify command detects an issue, you can rename the /var/lib/rpm/Packages file.

mv /var/lib/rpm/Packages /var/lib/rpm/Packages.old

 

And then use the rpmdb_dump and rpmdb_load commands to create a new RPM database Packages file.

/usr/lib/rpm/rpmdb_dump /var/lib/rpm/Packages.old | /usr/lib/rpm/rpmdb_load /var/lib/rpm/Packages

 

And then use the rpm command with the -vv and --rebuilddb flags to rebuild the RPM database.

rpm -vv --rebuilddb

 




Did you find this article helpful?

If so, consider buying me a coffee over at Buy Me A Coffee



Comments


Add a Comment


Please enter 2d6103 in the box below so that we can be sure you are a human.