PDA

View Full Version : [ubuntu] [9.04] Is it ok to remove old and unwanted kernel images?



legolas_w
June 29th, 2009, 08:39 AM
Hi thank you for reading my post.
I installed kernel server image to use all of my 4gb ram and now I want to remove the generic kernel to prevent the system from download its updates and related modules.

menu.lst file contains the following description for these two images:



title Ubuntu 9.04, kernel 2.6.28-11-server
uuid 23caec3b-2cf8-4824-ac78-f36480daf57b
kernel /boot/vmlinuz-2.6.28-11-server root=UUID=23caec3b-2cf8-4824-ac78-f36480daf57b ro acpi_osi="Linux" quiet splash
initrd /boot/initrd.img-2.6.28-11-server
quiet


title Ubuntu 9.04, kernel 2.6.28-11-generic
uuid 23caec3b-2cf8-4824-ac78-f36480daf57b
kernel /boot/vmlinuz-2.6.28-11-generic root=UUID=23caec3b-2cf8-4824-ac78-f36480daf57b ro acpi_osi="Linux" quiet splash
initrd /boot/initrd.img-2.6.28-11-generic
quiet

I am wondering whether it is safe to remove the following packages using synaptic to get rid of the generic kernel which I never boot into or some of these packages are required?



linux-headers-generic
linux-image-generic
linux-headers-2.6.28-11-generic
linux-restricted-modules-generic
linux-generic
linux-restricted-modules-2.6.28-11-generic
linux-image-2.6.28-11-generic



If my package selection is wrong, please let me know which packages I should remove and which packages I should not.

Thanks

mcduck
June 29th, 2009, 09:02 AM
Yes, you can safely remove old kernel versions with apt/Synaptic.

Most people prefer keeping on older version available in case something goes wrong. (I don't, as I've never ever had to to boot to older kernel, and in case something breaks I can always just use the live-CD).

One thing you definitely don't want to remove are the kernel meta packages, linux-generic, linux-headers-generic, linux-image-generic, linux-restricted-modules-generic etc.. These packages are what makes kernel updates work, so removing them would stop your kernel version from updating.

So, if you want to remove a kernel version, just remove the actual kernel packages, nothing else:

linux-headers-2.6.28-11-generic
linux-restricted-modules-2.6.28-11-generic
linux-image-2.6.28-11-generic

Paqman
June 29th, 2009, 09:05 AM
And the nice thing about removing old kernels in Synaptic is that it will clean up your menu.lst as well. As mcduck says, only remove actual numbered kernel packages, not the meta-packages.

legolas_w
June 29th, 2009, 12:10 PM
Thank you all, it worked and now I only have the server kernel image which support 4 gig of ram.