LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 03-09-2009, 10:48 PM   #1
GGlinux
LQ Newbie
 
Registered: Oct 2008
Posts: 28

Rep: Reputation: 15
Removing an old kernel from my system


Hi Everyone I have just compiled a new kernel version (the latest) over an old centos kernel so I can have access to the latest kernel features. Problem is that I still have the old kernel on my HD.

What is the cleanest way of removing the old kernel without killing my linux system?
 
Old 03-09-2009, 11:12 PM   #2
jamescondron
Member
 
Registered: Jul 2007
Location: Scunthorpe, UK
Distribution: Ubuntu 8.10; Gentoo; Debian Lenny
Posts: 961

Rep: Reputation: 69
So long as your grub conf/ lilo conf is set up to see both kernels, remove it- so long as you boot with the new one, the old one can be done with what you want. Saying that, though, why bother? Why not keep the old one as a stable one, or even use it to make changes to in a risk free environment (you don't want to hose your only kernel, of course)
 
Old 03-09-2009, 11:56 PM   #3
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 671Reputation: 671Reputation: 671Reputation: 671Reputation: 671Reputation: 671
I second the advice to keep the old version around. It you had an even older one, you could edit grub to delete the stanza for it; delete the kernel & initrd and the modules in /lib/modules/<old_version>/.
You may also have the source tree for that version as well that you don't need.
 
Old 03-10-2009, 12:43 AM   #4
GGlinux
LQ Newbie
 
Registered: Oct 2008
Posts: 28

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by jamescondron View Post
So long as your grub conf/ lilo conf is set up to see both kernels, remove it- so long as you boot with the new one, the old one can be done with what you want. Saying that, though, why bother? Why not keep the old one as a stable one, or even use it to make changes to in a risk free environment (you don't want to hose your only kernel, of course)
Well the reason I want to remove it entirely is because it is an image i need to deploy to over 100 sites and because I have two kernels, the image size is over 2 gigs. I want to be able to get the size as small as possible and the kernel as clean as possible.
 
Old 03-10-2009, 01:32 AM   #5
frieza
Senior Member
 
Registered: Feb 2002
Location: harvard, il
Distribution: Ubuntu 11.4,DD-WRT micro plus ssh,lfs-6.6,Fedora 15,Fedora 16
Posts: 3,202

Rep: Reputation: 397Reputation: 397Reputation: 397Reputation: 397
i doubt the kernel is at fault there
my comp has 3 kernels installed, between the contents of my /boot partition and /lib/modules it is < 300 megs combined for ALL 3
but if you need to get rid of an older kernel, simply remove the entry in /boot/grub.conf (or menu.lst, which i find is often just a symlink to grub.conf anyways, remove the relevant vmlinux,System.map, and initrd files, then remove the relevant directory from /lib/modules
or if it was installed using the system's package manager just use the package manager's 'uninstall' feature
although imho this seems pointless because the slight increase in space doesn't seem to me to justify sacrificing having a 'lifeboat' handy in case something goes wrong with your current kernel
fedora seems to leave 3 or 4 versions of the kernel installed 'just in case'

as they say, fortune favours the prepared mind
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
removing the X11 system entirely? hatchetwkd Linux - Newbie 1 06-22-2008 02:37 AM
Removing System Users aquilla Slackware 7 10-04-2006 04:03 AM
Removing Windows From System paul2463 Linux - General 3 08-28-2006 06:27 PM
Removing Solaris from SYSTEM COMMANDER? as400 Solaris / OpenSolaris 5 08-18-2006 12:27 AM
removing a IA32 chroot system? deroB Debian 3 02-13-2006 09:46 AM


All times are GMT -5. The time now is 07:19 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration