PDA

View Full Version : [ubuntu] Remove old kernel(s) via command line?



pi.boy.travis
July 13th, 2009, 11:23 PM
Hi!

My server has lots of older kernels on it. If I have already booted up the latest kernel, is there a way to delete the old ones with the command line? (no GUI)

Thanks in advance!

bodhi.zazen
July 13th, 2009, 11:29 PM
sudo apt-get remove <kernel>

pi.boy.travis
July 13th, 2009, 11:45 PM
Thanks! That was easier than I expected.

LewRockwell
July 13th, 2009, 11:50 PM
http://www.ubuntugeek.com/howto-clean-up-your-packages.html

http://ubuntuforums.org/showthread.php?t=996053


sudo apt-get autoremove

.

pi.boy.travis
July 13th, 2009, 11:57 PM
OK, now I am being told that I may have to re-run my bootloader [grub]. How might I go about this?

Thanks in advance!

LewRockwell
July 14th, 2009, 12:51 AM
OK, now I am being told that I may have to re-run my bootloader [grub]. How might I go about this?

Thanks in advance!

are you using grub?

on a server?

multi-boot?

.

pi.boy.travis
July 14th, 2009, 06:51 PM
I'm using grub (v1.5, I think), and Ubuntu is the only OS.

LewRockwell
July 14th, 2009, 07:00 PM
I'm using grub (v1.5, I think), and Ubuntu is the only OS.

grub shouldn't be necessary if Ubuntu is the only OS...

strange...

.

pi.boy.travis
July 14th, 2009, 07:02 PM
Ubuntu is the only OS, but something still has to load the kernel and initramfs, correct?

mcduck
July 14th, 2009, 08:14 PM
grub shouldn't be necessary if Ubuntu is the only OS...

strange...

.

Bootloader is always necessary, not just for dualbooting. You need something to load the OS kernel into RAM to boot the OS, the only difference between Grub and for example NTLDR or winload.exe/Windows Boot Manager (used by Windows, NTLDR in Windows NT variants and WMB in Vista) is that Grub has better support for booting other operating systems than just the one it was made for.

jerome1232
July 14th, 2009, 08:18 PM
Is it wanting you to do this?


sudo grub-update

Thought that was done for you /shrug