Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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:

vmlinuz-2.6.32-21-generic-pae
vmcoreinfo-2.6.32-21-generic-pae
System.map-2.6.32-21-generic-pae
initrd.img-2.6.32-21-generic-pae
config-2.6.32-21-generic-pae
abi-2.6.32-21-generic-pae

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

share|improve this question

3 Answers 3

up vote 4 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

Your Answer

 
discard

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.