RHEL / CentOS Yum Command: Blacklist Packages [ Disable Certain Packages ]

https:‮//‬www.lautturi.com
RHEL / CentOS Yum Command: Blacklist Packages [ Disable Certain Packages ]

To blacklist packages and disable them from being installed or updated on a Red Hat Enterprise Linux or CentOS system, you can use the yum-plugin-blacklist package and the yum-config-manager command.

First, install the yum-plugin-blacklist package using the yum package manager:

sudo yum install yum-plugin-blacklist

Next, use the yum-config-manager command with the --disable option to disable a specific package or group of packages. For example, to disable the httpd package, you can use the following command:

sudo yum-config-manager --disable httpd

This will prevent the httpd package from being installed or updated using yum.

You can also use the --enable option to re-enable a package that has been blacklisted. For example:

sudo yum-config-manager --enable httpd

It's always a good idea to carefully review the documentation and use the appropriate commands to manage packages on your system using yum. Blacklisting packages can be useful in cases where you want to prevent certain packages from being installed or updated on your system.

Created Time:2017-10-30 14:27:13  Author:lautturi