Unfortunately, it happens rather often recently that Red Hat Package Manager (rpm) just hangs during some operation. After it does so, rpm stops working completely and even reboot (hehe) doesn’t help. Well, the problem is well known and is in Red Hat’s bugzilla. For now, here is a quick fix for you.
First, kill the rpm process:
[root@home tmp]# killall -KILL rpm
Now, you need to remove lock files which rpm created for it’s database. If you will list the files in /var/lib/rpm, then you will notice 3 (three) files which have their names like __db.001, __db.002, __db.003 . Remove them. Fast way to it would be:
[root@home tmp]# rm -f /var/lib/rpm/__db.00?
That’s it. Now, your rpm utility will start to work again. Enjoy.