Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I have kernel 2.6.38 still visible in the grub menu and I see

abi-2.6.38-11-generic
config-2.6.38-11-generic
initrd.img-2.6.38-11-generic
vmlinuz-2.6.38-11-generic

(among the respective files for the recent kernel) in /boot.

But when I try to find the package with dpkg I don't see it:

$ dpkg -l | grep linux-image
2338:rc  linux-image-3.0.0-14-generic     3.0.0-14.23    Linux kernel image for version 3.0.0 on x86/x86_64
2339:rc  linux-image-3.0.0-15-generic     3.0.0-15.26    Linux kernel image for version 3.0.0 on x86/x86_64
2340:rc  linux-image-3.0.0-16-generic     3.0.0-16.29    Linux kernel image for version 3.0.0 on x86/x86_64
2341:ii  linux-image-3.2.0-29-generic     3.2.0-29.46    Linux kernel image for version 3.2.0 on 64 bit x86 SMP
2342:ii  linux-image-generic              3.2.0.29.31    Generic Linux kernel image

How can I remove these old kernel files safely?

I am running Ubuntu 12.04, uname -a reads

Linux XYZ 3.2.0-29-generic #46-Ubuntu SMP Fri Jul 27 17:03:23 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux
share|improve this question

1 Answer 1

up vote 1 down vote accepted

You can safely remove any file/directory having 2.6.38-11 in their names, as this is not your running kernel anymore. This kernel must have been installed during a precedent Ubuntu install.

They should normally belong to a package, but as they are not, you should remove them manually.

To know what type of files are installed with a kernel, you can do dpkg -L linux-image-3.2.0-29-generic | less

Then you can remove all the files/directories listed by ls -1d /{boot,lib/modules,lib/firmware,usr/share/doc}/*2.6.38-11*

Then run sudo update-grub, it should purge the grub entry. If not, check the content of /etc/grub.d

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.