How to Rebuild RPM Database
Follow these steps
Take the backup of /var/lib/rpm Directory
1) tar zcvf /var/lib/rpm.backup.tar.gz /var/lib/rpm
Verify Integrity
2) cd /var/lib/rpm
3) rm –f __db*
4) /usr/lib/rpm/rpmdb_verify Packages
Dump & Load Package
5) mv Packages packages.backup
6) /usr/lib/rpm/rpmdb_dump Packages.backup | /usr/lib/rpm/rpmdb_load Packages
7) /usr/lib/rpm/rpmdb_verify Packages
8) rpm –qa
Final Step to rebuild database
9) rpm –vv –rebuilddb
Take the backup of /var/lib/rpm Directory
1) tar zcvf /var/lib/rpm.backup.tar.gz /var/lib/rpm
Verify Integrity
2) cd /var/lib/rpm
3) rm –f __db*
4) /usr/lib/rpm/rpmdb_verify Packages
Dump & Load Package
5) mv Packages packages.backup
6) /usr/lib/rpm/rpmdb_dump Packages.backup | /usr/lib/rpm/rpmdb_load Packages
7) /usr/lib/rpm/rpmdb_verify Packages
8) rpm –qa
Final Step to rebuild database
9) rpm –vv –rebuilddb
Comments
Post a Comment