Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

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

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.

share|improve this question
up vote 5 down vote accepted

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.

share|improve this answer
Lol. +1 for "unexpected" – jdw Dec 20 '11 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).

share|improve this answer
Kernel Packages not follow autoremove. Autoremove is only for dependencies that are no longer used by anything installed in the system. – Squidly Dec 19 '11 at 21:32
Good point - edited. – Shane Madden Dec 19 '11 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.

share|improve this answer

I've written a tool that automates this chore, in case it helps anyone else:

share|improve this answer

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.