Print Logo

Rebuilding the RPM Database




<<  <   >  >>

Be very careful messing with your RPM database. You can cause serious system failure if you mess up your RPM packages. One trick that works for us is to rebuild the RPM database:

[root@www root]# cd /var/lib/rpm/
[root@www rpm]# ls
Basenames     __db.003  Installtid   Provideversion  Sha1header
Conflictname  Dirnames  Name         Pubkeys         Sigmd5
__db.001      Filemd5s  Packages     Requirename     Triggername
__db.002      Group     Providename  Requireversion
[root@www rpm]# rm __db*
rm: remove regular file `__db.001'? y
rm: remove regular file `__db.002'? y
rm: remove regular file `__db.003'? y
[root@www rpm]# rpm --rebuilddb
[root@www rpm]#

A corrupted RPM database can cause problems with up2date locking up.



This article comes from NetAdminTools:
http://www.netadmintools.com/

The URL for this story is:
http://www.netadmintools.com/art451.html

Copyright 1997-2009 NetAdminTools.com. Read our Terms of Use.