Thursday, July 03, 2008

yum database clean up

Sometimes when yum is not updating, or simply not synchronized with the repository, it's a good idea to clean up the cache database and fetch a new list from the server.

  1. yum clean all

  2. mv /var/cache/yum/ /tmp/

  3. mv /var/lib/rpm/__db* /tmp/

  4. rpm --rebuilddb


Somehow I tend to move the files to /tmp/ rather then just remove them, since the rm -rf command is the No. 1 enemy of idiocity.

6 comments:

Michael said...

Your third command must be "mv" instead of "rm".

Nerf said...

Your blog software converted two dashes to a long dash in step 4

Gideon said...

ah thanks. Corrected.

Oritsu Alvin said...

Worked like a charm

convidlerism said...

GOOOODD!!
thanks :)

Santosh Marigowda said...

Thank you.