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

Dear Community!
I need it to do it automagically:
In the "old days" I just installed the startupmanager and set that that it automaticly only leaved the last 2 fresh kernels, so even if a kernel update came, it did it by itself and I don't had to care about it!
How could I set this on Ubuntu 10.04 WITH GRUB2?
CLI or GUI solution - it doesn't matter
Thank you!

share|improve this question
up vote 0 down vote accepted

I had the same problem, what I found was "grub-customizer" which helps in a different way than startupmanager, but it also configures what you want if you decide to use BURG instead of GRUB.

Open the terminal and run the following commands:

sudo add-apt-repository ppa:danielrichter2007/grub-customizer
sudo apt-get update
sudo apt-get install grub-customizer

enter image description here

The you can find the launcher Applications >System Tools >Grub Customizer

share|improve this answer
What is the package name of the Grub customizer? – LanceBaynes Apr 28 '11 at 15:45
Hello @LanceBaynes, the "grub-customizer" require you to add it's repository. sudo add-apt-repository ppa:danielrichter2007/grub-customizer – Papiux Apr 28 '11 at 16:36

dpkg --get-selections | grep linux-image | grep install | grep -v deinstall | sort | head -n-3 > installedkernels

Should get you a list of kernels not including the last 2 and the pseudo-package for current. You could then cut the first field and feed it to sudo apt-get -y remove

Disclaimer: I am not a fan of automagically doing anything with kernels, so I won't provide the full cut and paste code. A bit of man cut and man cronshould get you the rest of the way there.

share|improve this answer
Thank you very much! – LanceBaynes Apr 28 '11 at 15:46

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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