CentOS 4 rpm –rebuilddb stuck on Packages
If you have already removed /var/lib/rpm/__db* and rpm –vv –rebuilddb (or strace) shows it is stuck on /var/lib/rpm/Packages but you are not able to salvage Packages due to db_dump and db_load being unavailable you can move Packages out of the way, –rebuilddb, restore the old Packages, and –rebuilddb again. rpm should then function correctly.