Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Possible Duplicate:
Is there a way to remove/hide old kernel versions?

Any clean solutions for cleaning up the /boot mount? It seems to fill with kernels but I'd like to make sure the overall package management knows they are gone.

Do you really need to remove one by one?


share|improve this question

marked as duplicate by Lekensteyn, fossfreedom, psusi, Takkat, Jorge Castro Feb 13 '12 at 22:57

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

up vote 0 down vote accepted

If you don't like uninstalling them one by one, install synaptic, start it, search for "linux" there - it'll show you the list of your kernels.

tick-tick-tick; Uninstall; Apply. Done.

share|improve this answer

What I can guess is that you might to remove the old kernels. You can do this by

  1. uname -r

uname -r

Note down the current version of kernel

dpkg -l 'linux-image-*' | grep '^ii'

output of dpkg -l linux-image-...

Note down the kernel version(s) (the numbers after the linux-image, ie x.y.z.-generic) (Include "-generic too")

Then run this command to delete old kernels WARNING : DO NOT DELETE THE KERNEL WHOSE VERSION YOU PREVIOUSLY NOTED DOWN IN "uname -r"

sudo apt-get purge linux-image-x.y.z-generic

(In my case it will be sudo apt-get purge linux-image- since linux-image- is the version I noted down in "uname -r")

Lastly update grub with the commands

sudo update-grub2


sudo update-grub

(Running both wont do any harm to the computer)

Hope this helped you.

share|improve this answer
Thanks...thats a bit what I was concerned about. The one by one approach – Cykoduck Feb 13 '12 at 16:01
dpkg -l 'linux-image-[0-9]*' | grep '^ii' | grep -v `uname -r` | awk '{print $2}' | xargs sudo apt-get purge -y # close eyes and press Enter – BipedalShark Feb 19 '13 at 20:36

Not the answer you're looking for? Browse other questions tagged or ask your own question.