Golfreeze.packetlove.com: Life style of Golfreeze Canon400D Family kammtan.com Jazz Freebsd Unix Linux System Admin guitar Music

All about unix linux freebsd and FAQ for Packetlove.com Web hosting , Mail hosting , VoIP + IP PBX server => Os kernel การปรับแต่ง เพิ่มเติม ลงโปรแกรม บน OS และ ControlPanel Directadmin,Cloud server => Topic started by: golfreeze on ตุลาคม 24, 2019, 08:31:46 PM

Title: keep kernel 2 version to reduce space on /boot in linux
Post by: golfreeze on ตุลาคม 24, 2019, 08:31:46 PM
Do the following to keep just the last 2 kernels on your system, to keep /boot clean

1 - Edit /etc/yum.conf and set the following parameter

installonly_limit=2
This will make your package manager keep just the 2 last kernels on your system(including the one that is running)

2 - Install yum-utils:

yum install yum-utils
3- Make an oldkernel cleanup:

package-cleanup --oldkernels --count=2
Done. This will erase in a good fashion the old kernels, and, keep just the last 2 of them for the next upgrades.