CentOS /RHEL: How To Prevent Yum From Updating The Kernel
I would like to prevent yum from updating the kernel version on my centos system. How do I prevent yum from updating the kernel under centos or rhel operating system.
There are two ways to prevent yum command from updating the kernel. you need to edit the “/etc/yum.conf” configuration file or passing “-x” option to yum update command.
#1 To prevent yum update command to update kernel by editing the “/etc/yum.conf” file to add the following line:
exclude=kernel*
then save and close the configuration file.
Now you can run “yum update” command to update the system without updating the kernel.
#2 if you do not want to edit the configuration file, just directly issue the following command to update the system without updating kernel,type:
yum -x kernel* update
or
yum -exclude=kernel* update