Removing Old Kernels

Bret Busby bret at busby.net
Tue Dec 15 15:23:20 UTC 2009


On Tue, 15 Dec 2009, Tom H wrote:

> Date: Tue, 15 Dec 2009 01:14:08 +0100
> From: Tom H <tomh0665 at gmail.com>
> Reply-To: "Ubuntu user technical support, not for general discussions"
>     <ubuntu-users at lists.ubuntu.com>
> To: ubuntu-users at lists.ubuntu.com
> Subject: Re: Removing Old Kernels
> 
>> Editing menu.lst did not work.
>>
>> I tried setting howmany=3, and rebooting.
>>
>> I have both Debian 5 and Ubuntu 8.04 as boot options on this computer,
>> and Win XP, and I was not sure which grub (Debian or Ubuntu) was being
>> used, so I changed the menu.lst file in both distributions and rebooted.
>> I still got multiple kernels displayed for Ubuntu (only one was ever
>> displayed for Debian).
>>
>> The solution was using
>> ls /boot/*2.6*
>> to find all the kernel versions present, then
>> ls /boot/*2.6.x*
>> then
>> rm /boot/*2.6.x*
>> for each x< (current kernel version number - 3)
>> of the earlier kenerl versions found
>> then
>> update-grub
>> in both Ubuntu and Debian, and that worked.
>
> Did you leave the "#" in front of the "howmany"?
>

No.

> Your solution is OK in that it rids you of your unwanted kernels and
> initrds from /boot but I seem to remember that you were advised
> earlier to run "aptitude purge unwanted_kernel" because now the apt
> system does not know what you have done or thinks that you have broken
> packages and you also have unnecessary /lib/modules/... directories
> for the kernels that you have deleted.
>

I am not aware of that advice.

In the /boot directory (for each of Debian 5 and Ubuntu 8.04), were abou 
half a dozen files for each kernel version, that were removed at the 
same time, for each kernel version.

> Not the end of the world by any stretch of imagination but definitely
> unorthodox and inelegant...
>

But, it works.....

:)

--
Bret Busby
Armadale
West Australia
..............

"So once you do know what the question actually is,
  you'll know what the answer means."
- Deep Thought,
   Chapter 28 of Book 1 of
   "The Hitchhiker's Guide to the Galaxy:
   A Trilogy In Four Parts",
   written by Douglas Adams,
   published by Pan Books, 1992

....................................................




More information about the ubuntu-users mailing list