Removing those extra kernels in Ubuntu
Tuesday, April 8, 2008 | Labels: Ubuntu | |There are times when you need to remove extra kernels from your Ubuntu installation. For instance, when you are a beta tester of the upcoming Ubuntu Hardy Heron. Every time there is a kernel update, the previous kernel is kept as a fallback for you should you run into any showstopper bug while using the new kernel. If you are like me, you will end up with these bunch of kernels:
teslarage@PONSB-COE-DEV:~$ ls /boot/
abi-2.6.22-14-generic initrd.img-2.6.24-15-generic
abi-2.6.24-12-generic initrd.img-2.6.24-15-generic.bak
abi-2.6.24-15-generic memtest86+.bin
config-2.6.22-14-generic memtest86+.bin.backup
config-2.6.24-12-generic System.map-2.6.22-14-generic
config-2.6.24-15-generic System.map-2.6.24-12-generic
grub System.map-2.6.24-15-generic
initrd.img-2.6.22-14-generic vmlinuz-2.6.22-14-generic
initrd.img-2.6.22-14-generic.bak vmlinuz-2.6.24-12-generic
initrd.img-2.6.24-12-generic vmlinuz-2.6.24-15-generic
initrd.img-2.6.24-12-generic.bak
abi-2.6.22-14-generic initrd.img-2.6.24-15-generic
abi-2.6.24-12-generic initrd.img-2.6.24-15-generic.bak
abi-2.6.24-15-generic memtest86+.bin
config-2.6.22-14-generic memtest86+.bin.backup
config-2.6.24-12-generic System.map-2.6.22-14-generic
config-2.6.24-15-generic System.map-2.6.24-12-generic
grub System.map-2.6.24-15-generic
initrd.img-2.6.22-14-generic vmlinuz-2.6.22-14-generic
initrd.img-2.6.22-14-generic.bak vmlinuz-2.6.24-12-generic
initrd.img-2.6.24-12-generic vmlinuz-2.6.24-15-generic
initrd.img-2.6.24-12-generic.bak
That is just too much, isn't it? So how do you delete them? I wouldn't recommend doing an 'rm' command here as that would screw up other things in Ubuntu. What you should do is:
sudo apt-get remove linux-image-2.6.22-14-generic
When you check your /boot again, you will notice that the kernel you want to remove is gone:
teslarage@PONSB-COE-DEV:~$ ls /boot
abi-2.6.24-12-generic initrd.img-2.6.24-15-generic.bak
abi-2.6.24-15-generic memtest86+.bin
config-2.6.24-12-generic memtest86+.bin.backup
config-2.6.24-15-generic System.map-2.6.24-12-generic
grub System.map-2.6.24-15-generic
initrd.img-2.6.24-12-generic vmlinuz-2.6.24-12-generic
initrd.img-2.6.24-12-generic.bak vmlinuz-2.6.24-15-generic
initrd.img-2.6.24-15-generic
abi-2.6.24-12-generic initrd.img-2.6.24-15-generic.bak
abi-2.6.24-15-generic memtest86+.bin
config-2.6.24-12-generic memtest86+.bin.backup
config-2.6.24-15-generic System.map-2.6.24-12-generic
grub System.map-2.6.24-15-generic
initrd.img-2.6.24-12-generic vmlinuz-2.6.24-12-generic
initrd.img-2.6.24-12-generic.bak vmlinuz-2.6.24-15-generic
initrd.img-2.6.24-15-generic
So, that's how you do it, just like removing a package in Ubuntu :)
If you need to check what other kernels you have installed, do this:
dpkg --get-selections | grep linux-image-2.6.2
And that is how you manage your kernels in Ubuntu :)

kawe dok pahem apa itu kernel
From wikipedia:
The Linux kernel is a Unix-like operating system kernel. It is the namesake of the Linux family of operating systems. Released under the GNU General Public License version 2 (GPLv2) and developed by contributors worldwide, Linux is one of the most prominent examples of free software.