Wednesday, July 1, 2009

Fixing corrupted RPM db

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

cd /var/lib/rpm
rm -rf __db*

Rebuild RPM database

# rpm --rebuilddb
# rpmdb_verify Packages

If you are still getting errors, then try your luck with following commands:

# mv Packages Packages-BAKUP
# db_dump Packages-BAKUP | db_load Packages
# rpm -qa
# rpm --rebuilddb

No comments:

Post a Comment