[CentOS] CentOS 7 - Limiting rescue kernel imeges

Sun Aug 23 10:23:57 UTC 2015
Luigi Rosa <lists at luigirosa.com>

In order to keep only 3 kernel images on a CentOS 7 I edited /etc/yum.conf and I 
put

installonly_limit=3


This parameter works for standard kernel images, but does not work for rescue 
images:

$ ls -al /boot/vmlinuz*

-rwxr-xr-x 1 root root 5027376 May 13 20:46 
/boot/vmlinuz-0-rescue-2554e2ffad84452bb07401bed0a61089
-rwxr-xr-x 1 root root 3084288 Jun 27 06:42 
/boot/vmlinuz-0-rescue-2be43759d5354c5a84125dea5b4a02ab
-rwxr-xr-x 1 root root 5029136 Mar 18 05:18 
/boot/vmlinuz-0-rescue-3871136569fb49cb934a276af5e09b32
-rwxr-xr-x 1 root root 5029008 Mar 31 19:54 
/boot/vmlinuz-0-rescue-ca5579e88a014362836fa90f4aa34248
-rwxr-xr-x 1 root root 5029744 Aug  6 16:31 
/boot/vmlinuz-0-rescue-e2ae4db2b909488088e78ac4064661d2
-rwxr-xr-x 1 root root 5029744 Aug  6 03:15 /boot/vmlinuz-3.10.0-229.11.1.el7.x86_64
-rwxr-xr-x 1 root root 5027376 May 13 12:15 /boot/vmlinuz-3.10.0-229.4.2.el7.x86_64
-rwxr-xr-x 1 root root 5029200 Jun 24 00:15 /boot/vmlinuz-3.10.0-229.7.2.el7.x86_64


Is there a way to keep rescue images within a certain limit?


Thank you in advance

-- 


Ciao,
luigi

/
+--[Luigi Rosa]--
\

In every revolution, there's one man with a vision.
     --James Kirk, "Mirror, Mirror"