How to remove unused Kernels in Fedora/Centos/Redhat Linux
I have a Fedora 16 system . Through kernel updates now I have several Kernel options when I boot the machine. So thought of removing old kernels.I like to keep the boot process clean.
there are few way to remove the kernels that are no longer current. the process is fairly simple,
To remove it , run as root
# rpm -e kernel-version
in a terminal (Main Menu > System Tools > Terminal) where version is the full release number. Enter
# rpm -q kernel
to get the installed kernels.
or
Run this command as root/super user,
# package-cleanup –oldkernels
After loading packages you will be promoting to enter an option,as below…
Dependencies Resolved
=======================================================================================================================================================================
Package Arch Version Repository Size
=======================================================================================================================================================================
Removing:
kernel i686 3.1.5-2.fc16 @updates 92 M
kernel-devel i686 3.1.5-2.fc16 @updates 26 M
Removing for dependencies:
kmod-wl-3.1.5-2.fc16.i686 i686 5.100.82.112-1.fc16.5 installed 2.5 M
Transaction Summary
=======================================================================================================================================================================
Remove 3 Packages
Installed size: 121 M
Is this ok [y/N]: y
Downloading Packages:
Running Transaction Check
Running Transaction Test
Transaction Test Succeeded
Running Transaction
Warning: RPMDB altered outside of yum.
Erasing : kmod-wl-3.1.5-2.fc16.i686-5.100.82.112-1.fc16.5.i686 1/3
Erasing : kernel-3.1.5-2.fc16.i686 2/3
Erasing : kernel-devel-3.1.5-2.fc16.i686 3/3
Removed:
kernel.i686 0:3.1.5-2.fc16 kernel-devel.i686 0:3.1.5-2.fc16
Dependency Removed:
kmod-wl-3.1.5-2.fc16.i686.i686 0:5.100.82.112-1.fc16.5
Complete!
Thats it. you have removed your old/unused kernels.