Tuesday, July 14, 2015

how to fix the RPM stuck problem

how to fix the RPM stuck problem 
when running rpm -qa |grep something , then it gets stuck forever ...

It's problably due to the a huge number of RPM process ...

I was suggested to do the following: 
  • ps -ef|grep rpm |awk '{print $2}' | xargs kill -9
  • cd /var/lib/rpm/
  • ls
  • rm -f  __*


Other related links: 
http://unix.stackexchange.com/questions/166966/rpm-command-stuck-freeze-when-installing-rpm-file



rpm may be waiting for a lock to be freed.
First, run ps -ef | grep rpm to see if you have any RPM commands running. If you do, kill them using kill -9.
Next, delete any leftover locks rm -rf /var/lib/rpm/__db.0*