Wednesday, June 5, 2013

Rebuild rpm database

Rebuilding corrupted RPM database

Method # 1

Remove /var/lib/rpm/__db* files to avoid stale locks:
# cd /var/lib
# rm __db*

Rebuild RPM database:
# rpm --rebuilddb
# rpmdb_verify Packages

Method # 2

If you are facing the issue still, try with the below commands

cd /var/lib/rpm
# mv Packages Packages_backup2013
# db_dump Packages_backup2013 | db_load Packages
# rpm -qa
# rpm --rebuilddb

No comments: