Removing old kernels that are not actually installed

Colin Law clanlaw at
Fri Apr 27 09:06:59 UTC 2012

On 27 April 2012 09:52, Murat D. Kadirov <md.kadirov at> wrote:
> On 27.04.2012 13:47, Colin Law wrote:
>> On 26 April 2012 22:32, William Scott Lockwood III <vladinator at> wrote:
>>> On Thu, Apr 26, 2012 at 4:21 PM, NoOp <glgxg at> wrote:
>>>> On 04/26/2012 02:00 AM, Colin Law wrote:
>>>>> I know how to remove old kernels by finding them in synaptic an
>>>>> uninstalling them but I have a machine that has been through numerous
>>>>> upgrades over the years and seems to have ended up with a number of
>>>>> kernels in /boot that are found by update-grub but according to
>>>>> synaptic are not installed.  For example:
>>>>> ~$ ls /boot/*2.6.27*
>>>>> /boot/abi-2.6.27-11-generic         /boot/
>>>>> /boot/config-2.6.27-11-generic      /boot/vmcoreinfo-2.6.27-11-generic
>>>>> /boot/initrd.img-2.6.27-11-generic  /boot/vmlinuz-2.6.27-11-generic
>>>>> Can I just remove all these files?
>>>>> Colin
>>>> Yes - as long as you are no longer using 2.6.27-*
>>> The proper way to remove them is better of course - use apt-get or
>>> aptitude to remove the packages that installed them.
>>> Hint: dpkg -l | grep linux
>> As I can see they are not "installed".  dpkg -l | grep linux shows
>> only 2.6.35-25 and 2.6.35-22 but in /boot I have various versions of
>> 2.6.27, 2.6.28 and 2.6.31.  I can only guess that for some reason
>> upgrading has not removed the files over the years.
>> It seems likely that I can just delete them.
>> Thanks all for the help.
>> Colin
> There are also modules for them in /lib/modules

In fact there are only modules for the installed kernels there.  So
for some reason those were uninstalled but not the stuff in /boot.



More information about the ubuntu-users mailing list