Forcing package reinstall using yum

Due to some unfortunate circumstances, I’ve recently had to reinstall a few packages onto a RHEL 5 server. Specifically, some of the files provided by those packages had been accidentally deleted, and they weren’t included in any recent backup…

There is no option to tell yum to force the install of a package – if it appears in the rpm database, yum won’t install it. I was able to get around this by first removing the package from the db, using:

rpm -e --justdb --nodeps PACKAGE

Now that the package no longer appeared in the database, a simple:

yum install PACKAGE

Was enough to patch things up.

Leave a Reply