3

I know that in CentOS 6.x, you can put the following line in /etc/yum.conf which tells yum to keep the last N kernels (by default this is set to five):

installonly_limit=5

However, there are cases when using experimental kernels (such as from ELRepo) where I want to keep a specific kernel around even if there have been 5+ updates to that kernel's package.

Are there edits to be made to /boot/grub/grub.conf or are there configuration options for yum (or dracut) to do this?

tgharold
  • 609
  • 8
  • 19

1 Answers1

4

You need to have yum version 3.2.26 or above and if you don't have it install yum-utils package which comes with the yumdb script. Using yumdb you can set a certain package to be kept from being removed on updates.

yum update yum
yum install yum-utils
yumdb set installonly keep kernel-2.6.32-279.2.1.el6.x86_64
Mehmet
  • 396
  • 1
  • 6