How to reinstall a package using YUM ?

There would be situations where the package install is so corrupted and we can’t remove the package with –nodeps to remove it from server and just install the package only. Remove the package from the local RPM database to trick yum into reinstalling the package. Please note that no files are deleted when using rpm -e with –justdb.

So here is what you have to do, to reinstall a openssh-server.

[root@support home]# rpm -qV openssh-server.x86_64
S.5....T  c /etc/pam.d/sshd
S.5....T  c /etc/ssh/sshd_config

[root@support home]# rpm -e --justdb --nodeps openssh-server.x86_64

[root@support home]# yum install openssh-server.x86_64

Related posts:

  1. How to create a RPM from source package(Creating CSF RPM)
  2. How to uninstall PostgreSQL manually.
  3. How to install 32 bit and 64 bit applications on 64 bit Ubuntu OS
  4. How to recompile Kernel?

Comment Form

About this blog

This blog, acts as a knowledge repository for the world and is unofficial! Anything we find interesting in the cyber world will go here. Most cases, this blog will reflect the happiness of our staff in reaching successful solution to an issue (s)he worked on. A reference for other fellow SAGEs who come across similar issues later