yum Frozen

We’ve had a few users report that yum is frozen on their VPS’s.  Usually ones running cPanel and I figured it was worth a quick post about how to solve it.  The problem is usually the rpm database has become corrupt.  It’s quite easy to fix all you need to do is run a few commands and it should hopefully fix everything up.

  1. Kill off any processes currently using RPM.  You most likely will have a few as yum is frozen and if you had anything else attempt to use yum or rpm it would be frozen as well.  So run the following command:

    lsof | grep /var/lib/rpm

    This will give you a list of processes that you need to kill.  Kill each with the following command:

    kill -9 processid

    Replacing processid with the id of the process on the list

  2. The next step is to remove the temporary rpm database files.  You can do this with the following command:

    rm -fv /var/lib/rpm/__*

  3. Finally you need to rebuild the rpm database and that can be done with the following command:

    rpm –rebuilddb -v -v

It’s that easy and now everything should work properly again.  I hope this helps some people out with issues with yum or rpm.

This entry was posted in Tips. Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.