Home / Software / How to Force YUM to Exclude Certain Packages

How to Force YUM to Exclude Certain Packages

YUM logoYUM is a package management system for Red Hat Enterprise Linux (RHEL), CentOS, Fedora, and other Red Hat-based Linux operating systems. It is command-line driven and is an easy tool you can use to keep your server updated and install any new software you need.

Normally, when you perform updates, YUM will search the distribution’s online repository and select any newly updated packages for download and installation. These may include everything from Apache web server to the Linux kernel itself.

Most of the time, it is a general good practice to update all of the available packages, but there are times when this may not be ideal. For example, if you know for certain that a new version of a particular package that you have installed will not work with a version of one of your web applications, you may want to delay updating until you have patched your application. Another possible scenario is that you may want to update most of your other packages now but wait until later to update the kernel, which will require a reboot.

YUM has a built-in feature that allows you to exclude a package or group of packages of your choosing. You can either use the exclude function on a long-term basis or for one particular update. To make a long-term change, you should edit your repository file (usually yum.conf). Find the [main] section and add the following line:

exclude=package1* package2 package3*

A name by itself will exclude only that package. The “*” after some names will exclude any packages with those words in it.

To exclude specific packages for a single update, you can use the exclude flag from the command line:

yum --exclude=packagename* update

If you later decide to proceed with updating that package, just run update without the exclude flag.

Check Also

Uk data center

Professional Data Centres In The UK

A professional data centre is a location in which various pieces of hardware are located …

Powered by Namesco
© Copyright InternetBlog.Org.Uk 2024, All Rights Reserved