I've got a Ubuntu server 10.04 that have been running since 10.04. Today when apticron mailed me about new packages the installation of a new kernel update failed due to a full /boot partition. Looking into it I have 226 MB of files in /boot and about 15 different revision of the kernel.

For each version I have the following 6 files:


Is it safe to just delete the oldest? Or is there a "proper" method of disposing old versions.

4 Answers 4


What does dpkg -l | grep linux-image show?

Once you get the kernel names you can just apt-get purge linux-image-version Just make sure you do not purge your current kernel. The results can be unexpected.

  • Lol. +1 for "unexpected"
    – jdw
    Dec 20, 2011 at 1:58

Remove extra kernel packages via apt-get instead of just deleting files from /boot.

apt-get remove the old linux-image packages manually (check dpkg --get-selections | grep linux-image to find what versions are installed).

  • Kernel Packages not follow autoremove. Autoremove is only for dependencies that are no longer used by anything installed in the system.
    – Squidly
    Dec 19, 2011 at 21:32
  • Good point - edited. Dec 19, 2011 at 21:35

Deleting old, outdated kernels is safe, but use aptitude purge linux-image-2.6.32-21-generic-pae, not rm!
Check what kernels are installed by invoking dpkg -l | grep linux-image-2.


I've written a tool that automates this chore, in case it helps anyone else: https://github.com/erichs/bootnukem.

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.