HowTo: Prevent Yum From Upgrading The Kernel On a CentOS / Red Hat Enterprise Linux

https://‮w‬ww.lautturi.com
HowTo: Prevent Yum From Upgrading The Kernel On a CentOS / Red Hat Enterprise Linux

To prevent yum, the package manager for CentOS and Red Hat Enterprise Linux, from upgrading the kernel on your system, you can use the exclude parameter in the yum.conf configuration file.

The exclude parameter specifies a list of packages that should be excluded from updates and installations. You can use the exclude parameter to exclude the kernel package and prevent yum from upgrading it.

To prevent yum from upgrading the kernel on your system, follow these steps:

  1. Open the yum.conf configuration file in a text editor. The file is usually located in the /etc directory.

  2. Add the exclude parameter to the yum.conf file and specify the kernel package as the value. For example:

exclude=kernel*
  1. Save the yum.conf file and exit the text editor.

  2. Run the yum clean command to clean the package cache and remove any cached information about the kernel package. This will ensure that yum does not try to upgrade the kernel package based on cached information.

# yum clean all

It's important to note that this is just one example of how to prevent yum from upgrading the kernel on a CentOS or Red Hat Enterprise Linux system. There are many other parameters and settings that you can configure in the yum.conf file to customize the behavior of yum. Consult the yum documentation and online resources for more information on how to use the exclude parameter and other yum configuration options.

Created Time:2017-10-29 22:08:44  Author:lautturi