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?