Hello one of my familly members, who is not so concerned with computers and Ubuntu has an Ubuntu setup with only 200MB space for the boot partition.

That makes sense if you only like to install a few kernels. Anyways Ubuntu keeps each kernel with each update. So the future updates of this person fail because the boot partition is full. That leads to problems. Once the system even ended up in a non bootable state.

What do you suggest that person to do?

Is there a possibility to enable an automatic clearance of the boot partition? If not, could it be build in into the software updater?

Thanks for replys.


The autoremoval of kernels in Ubuntu are controlled by the /etc/kernel/postinst.d/apt-auto-removal file. If the package is not marked for hold, than it should keep the last two versions and the newer ones. This means that you have to run the lastest version to can remove the older ones.

After you rebooted the latest kernel, issue the command:

sudo apt-get autoremove

If it doesn't help, you can alway fallback to this command:

dpkg -l linux-* | awk '/^ii/{ print $2}' | grep -v -e `uname -r | cut -f1,2 -d"-"` | grep -e [0-9] | grep -E "(image|headers)" | xargs sudo apt-get -y purge
  • That sounds good. Is there any idea why for my family member the auto removal does not work automatically on post install? – tokam May 24 '15 at 15:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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