Limit kernels with yum

Limiting a number of kernels with yum is simple:

  1. Edit /etc/yum.conf to add this:  installonly_limit=2
  2. yum install yum-utils
  3. package-cleanup –oldkernels –count=2