How do I force yum update command to exclude certain packages?

How do I force yum update command to exclude certain packages?

Temporary solution via Command line:

  1. # yum update –exclude=PACKAGENAME.
  2. # yum update –exclude=kernel*
  3. [main] cachedir=/var/cache/yum/$basearch/$releasever keepcache=0 debuglevel=2 logfile=/var/log/yum.log exclude=kernel* redhat-release* <====
  4. exclude=*.i? 86 *.i686.

What does yum Versionlock do?

yum-versionlock(1) is a Yum plugin that takes a set of name/versions for packages and excludes all other versions of those packages (including optionally following obsoletes). This allows you to protect packages from being updated by newer versions.

How do I stop yum from updating?

Disable/Lock Package Updates using Yum

  1. Permanently Disable Package for Install or Update. Open and edit the yum.
  2. Temporarily Disable Package for Install or Update.
  3. Disable Package Updates using Repository.
  4. Disable Package Update Using versionlock Option.

How to disable / lock certain package updates using Yum command?

For example, to lock the version of package say httpd to 2.4.6 only, just write following command as root. To view locked packages, use the following command will list the packages which have been version locked. These are a few tips which will help you Disable/Lock Package updates using yum package manager.

How to install Yum plugin versionlock plugin?

You need to install yum-plugin-versionlock plugin. It takes a set of name/versions for packages and excludes all other versions of those packages (including optionally following obsoletes). This allows you to protect packages from being updated by newer versions. Install yum-plugin-versionlock on a CentOS/RHEL server

How to mask the version of a package in Yum?

Another way in yum to mask the version of any package thus making it unavailable for up-gradation, is to use versionlock option of yum, but to do this, you must yum-plugin-versionlock package installed on the system. # yum -y install yum-versionlock.

How to lock the version of GCC in Yum?

To install or lock the version of the gcc package, add that package name to the /etc/yum/pluginconf.d/versionlock.list file by running: # yum versionlock gcc-* (Alternatively, you can edit the filelist, /etc/yum/pluginconf.d/versionlock.list, directly.)