Reinstalling a package using Yum

You can force the re-installation of a package using:

rpm -e --justdb --nodeps <package-name>
yum install <package-name>

This can be really useful if you’ve accidentally removed some components of the package, or perhaps hacked around with config files so much that you just want to go back to the original. Yum will automatically re-install any missing binaries, but it will not overwrite your existing config files. Instead, the ‘default’ config files will be written as “<filename>.rpmnew”.

This entry was posted in Linux and tagged . Bookmark the permalink. Follow any comments here with the RSS feed for this post.

Comments are closed.