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 use the main answer of this question quite often to clear some space, but now I'm in extreme need and I'd like to better understand which kernels are safe to purge, my list is the following

10:50:58-673 - ~> dpkg -l | grep -Eo "^.i +linux-(image|headers)[^ ]+" | cut -c 5- | grep --color -E "$|"`uname -r`
linux-headers-2.6.38-15
linux-headers-2.6.38-15-generic
linux-headers-2.6.38-15-generic-pae
linux-headers-2.6.38-16
linux-headers-2.6.38-16-generic
linux-headers-2.6.38-16-generic-pae # current one
linux-headers-generic
linux-headers-generic-pae
linux-headers-server
linux-image-2.6.38-15-generic-pae
linux-image-2.6.38-16-generic-pae
linux-image-generic-pae
linux-image-server

Is it enough to keep

linux-headers-2.6.38-15
linux-headers-2.6.38-15-generic
linux-headers-2.6.38-15-generic-pae
linux-headers-2.6.38-16
linux-headers-2.6.38-16-generic
linux-headers-2.6.38-16-generic-pae # current one

Or would this be enough

linux-headers-2.6.38-15-generic-pae
linux-headers-2.6.38-16-generic-pae # current one

Or which other would be the shortest (keeping the previous one too)? And why?

share|improve this question

1 Answer 1

up vote 0 down vote accepted

I assume you're using the generic-pae kernels; it's safe to remove the -server kernels, which you aren't using.

You must keep at least one kernel image (linux-image-2.6.38-16-generic-pae, etc.). It's recommended to keep at least 2, because if an update hoses the most recent kernel, you can still boot using the previous one.

You should also keep linux-image-generic-pae, which is a tiny meta-package that causes the latest kernel to be installed.

You should keep the corresponding headers for each kernel you keep; the headers are needed to build kernel modules for that kernel.

share|improve this answer
    
so you're saying linux-headers-2.6.38-15-generic-pae linux-headers-2.6.38-16-generic-pae linux-image-2.6.38-15-generic-pae linux-image-2.6.38-16-generic-pae –  ecoologic Sep 13 '12 at 9:23
    
as I'm using linux-headers-2.6.38-15-generic-pae this is needed too linux-headers-2.6.38-15-generic !!! –  ecoologic Oct 16 '12 at 11:24

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.