Clean out old kernels (and grub while you’re at it)

Again, more for my own reference than anybody else’s…
We’re talking Ubuntu here, by the way. I’m on 10.04 on my laptop and just installed 10.10 on the desktop

Problem: lots of Kernel entries in Grub (even had this dropping windows off the list in the old days and thought I’d done something VERY bad to my dual-boot laptop). Also, in the case of my Eeepc, a full root partition with a lot of unnecessary kernels.

I’ve found myself Googling this at least three times because I always forget which name to search for and remove in Synaptic. So here it is:
First, check which Kernel you’re using.

Open a terminal and type
uname -r
My output looked like:
2.6.32-25-generic
So make absolutely sure you don’t delete that one! If you’re conservative, you’ll also keep the revision before too.

Open Synaptic and search for
linux-image
the kernels you have installed will all have green boxes next to them BUT BEWARE, so does your current kernel

remove (in my case)
linux-image-2.6.32.23-generic
linux-image-2.6.32.24-generic

BUT NOT
linux-image-2.6.32.25-generic

Mark the unnecessary kernels for complete removal
You’re done, that’s another job jobbed as my Mum would say

This entry was posted in Diary, Linux. Bookmark the permalink.