Yum force reinstall

Since Yum does not have a force flag, rpm commands must be used along with Yum to do some heavy lifting. Here are a few ways to force the reinstall of a broken package on a Yum Managed system.

Yum Remove and then Install
The easiest solution is to yum remove the package and then yum install the same package. If there are too many dependencies at stake with the package in question, try another method.

# yum remove 
# yum install 

Force Erase and then Yum Install
RPM dependencies sometimes make a simple yum remove impossible and Yum will want to erase your entire OS before moving on. In this case, use rpm to force erase, then yum to install.

# rpm -e --nodeps 
# yum install 

Prune RPM Database and then Yum Install
If your package install is so corrupted that an rpm -e is dangerous or impossible, even with –nodeps, remove the package from the local RPM database to trick yum into reinstalling the package. No files are deleted when using rpm -e with –justdb.

#rpm -e --justdb --nodeps 
# yum install