Make RPM Work Again
December 29, 2008 · Filed Under Tutorials · Comment 

You’re facing a dilemma: RPM has stopped working on your box. You run the command, and it just hangs. Nothing happens. This is a quick fix that has worked several times for me in the past:

First, become root on the server by running:

su -

Once you have become root, then run the following:

killall -9 rpm
rm /var/lib/rpm/__*

There are 2 underscores in the rm command followed by an asterisk. You may be prompted to delete the following files:

/var/lib/rpm/__db.001
/var/lib/rpm/__db.002
/var/lib/rpm/__db.003

If you are, delete them and RPM should be working once again.