You are here: Home > Linux, Tips&Info > Rebuild a corrupted RPM database

Rebuild a corrupted RPM database

Strange things sometimes happen,one of them is a rpm database got corrupted . This means that the computer tells you something is installed and it really is not. i personally encountered this few times before and usually this happens when the ssh session/connection to the server cut off(i used to ssh to the server , and it is behind the vpn connection when i was doing yum update on server and when i re-login again to the server i just kill the yum right away :) , my bad,  better to use screen :) )

the symptom:
If rpm / yum command hangs during operations or you see error messages – it means your rpm database corrupted.  just backup your current rpm database, remove it and rebuild it most likely will solve the problem
# rm -f /var/lib/rpm/__db*
# rpm –rebuilddb
# yum update

Tags: , , ,

  • Digg
  • Del.icio.us
  • StumbleUpon
  • Reddit
  • Twitter
  • RSS

Comments are closed.