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.