You're almost there! Please answer a few more questions for access to the Applications content. Complete registration
Interested in joining? Complete your registration by providing Areas of Interest here. Register

Oracle Linux - How to remove old unused kernels (UEK and RHCK)

Applies to:

Oracle Cloud Infrastructure - Version N/A and later

Linux x86-64

Oracle Linux 8 – Oracle Linux 9.

Goal:

Remove old unused kernels to avoid /boot partition to fill up.

Manually running yum remove kernel* is dangerous and prone to error as a useful kernel can be deleted by mistake.

Solution:

Execute the below steps as root user (sudo su -)

[root@ ~]# df -hPT /boot
Filesystem     Type  Size  Used Avail Use% Mounted on
/dev/sda2      xfs  1014M  832M  183M  83% /boot              < -- about to run out of space

[root@ ~]# rpm -qa | egrep '^kernel' | egrep -v 'modules|core|headers|devel|tools'
kernel-4.18.0-513.24.1.el8_9.x86_64
kernel-4.18.0-553.8.1.el8_10.x86_64
kernel-uek-5.15.0-207.156.6.el8uek.x86_64
kernel-uek-5.15.0-201.135.6.el8uek.x86_64
kernel-uek-5.15.0-206.153.7.el8uek.x86_64
kernel-uek-5.15.0-102.110.5.1.el8uek.x86_64

Howdy, Stranger!

Log In

To view full details, sign in.

Register

Don't have an account? Click here to get started!