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


(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        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

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

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.