CentOS / RHEL: yum Command Reinstall Package

To reinstall a package using the yum package manager on CentOS or Red Hat Enterprise Linux (RHEL), you can use the yum reinstall command, followed by the name of the package you want to reinstall:

sudo yum reinstall <package_name>

For example, if you want to reinstall the httpd package:

sudo yum reinstall httpd

This command will download and install the latest version of the package, replacing any previously installed version of the package. Note that yum reinstall will also reinstall any dependencies of the package, if necessary.

You can also use the yum install command with the --reinstall option to achieve the same result:

sudo yum install --reinstall <package_name>

For example:

sudo yum install --reinstall httpd

This command will have the same effect as the yum reinstall command.

Leave a Comment