LinuxQuestions.org
Visit Jeremy's Blog.
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-31-2010, 12:15 AM   #1
james2b
Member
 
Registered: Feb 2007
Location: Washington state, USA
Distribution: Fedora 13, SUSE 11, Ubuntu 10.04, Mandriva 2010, Mint 8
Posts: 338

Rep: Reputation: 34
Question removing previous older kernels "vmlinuz" when updates get newer versions


Is removing previous older kernels "vmlinuz", when updates do get a newer version an easy task, or do the more recent Linux like Ubuntu 9.10 do that automatically, and only keep a few older previous kernels ?
 
Old 03-31-2010, 01:04 AM   #2
grail
LQ Guru
 
Registered: Sep 2009
Location: Perth
Distribution: Manjaro
Posts: 9,251

Rep: Reputation: 2684Reputation: 2684Reputation: 2684Reputation: 2684Reputation: 2684Reputation: 2684Reputation: 2684Reputation: 2684Reputation: 2684Reputation: 2684Reputation: 2684
No they don't remove them and yes it is easy.

Once you are happy that the the new kernel is working for you simply follow these steps:

Code:
cd /boot
sudo rm *<old version number>*

sudo vim grub/menu.lst # from here remove any lines pertaining to files deleted
 
Old 03-31-2010, 04:21 PM   #3
james2b
Member
 
Registered: Feb 2007
Location: Washington state, USA
Distribution: Fedora 13, SUSE 11, Ubuntu 10.04, Mandriva 2010, Mint 8
Posts: 338

Original Poster
Rep: Reputation: 34
Thumbs up

Okay and thanks, I will try that. I have had Fedora installed for some time, and it does keep only 2 older kernel versions plus the new one. Also can that older kernel removal be done with the package manager ?
 
Old 03-31-2010, 04:24 PM   #4
tredegar
LQ 5k Club
 
Registered: May 2003
Location: London, UK
Distribution: Debian "Jessie"
Posts: 6,085

Rep: Reputation: 398Reputation: 398Reputation: 398Reputation: 398
Quote:
Also can that older kernel removal be done with the package manager ?
In my experience, yes, and that is the best way to do it. It is what the "package manager" is for.
 
Old 04-05-2010, 01:00 AM   #5
james2b
Member
 
Registered: Feb 2007
Location: Washington state, USA
Distribution: Fedora 13, SUSE 11, Ubuntu 10.04, Mandriva 2010, Mint 8
Posts: 338

Original Poster
Rep: Reputation: 34
Question

With a graphical (GUI) type package manager, there is no older kernels in it listed as available to remove. Also each previous kernel version has a matching initial ram disk file to be removed as well, and there may be some dependencies such as nvidia driver kernel modules. My SUSE 11 does not keep any older kernels or ram disk files when it updates to newer ones, but the Ubuntu 8.04 has about 8 pairs of older boot files, ( the previous kernel's vmlinuz, and the initrd.img ). So then attempting to remove them manually with the rm command may cause some problems. Or is there some way to find them by a search in the package manager so that it is then safe to be removed, thanks.
 
Old 04-05-2010, 03:38 AM   #6
tredegar
LQ 5k Club
 
Registered: May 2003
Location: London, UK
Distribution: Debian "Jessie"
Posts: 6,085

Rep: Reputation: 398Reputation: 398Reputation: 398Reputation: 398
Quote:
and there may be some dependencies such as nvidia driver kernel modules.
If you change your running kernel, you may have to rebuild the NVIDIA module.

With the 'buntus, you can use your package manager to search for linux-image-kernel version number and then remove the ones you do not want.

You can also set up grub not to keep more than x "old kernels". How to do this depends on the version of grub you are using.
 
Old 07-29-2011, 04:55 PM   #7
fitzhugh
LQ Newbie
 
Registered: Jun 2006
Location: Berkeley
Distribution: Puppy Linux
Posts: 6

Rep: Reputation: 0
Warning - use grub 2 on Ubuntu 9.10 and newer

Most of the details above apply more to earlier versions of ubuntu. I know this is an old thread, but figured some might end up here looking for this info much as I did.

If you are using 9.10 or newer, and you can check by typing the following line in a terminal...
Code:
cat /etc/issue
... then you are using Grub 2, which requires a different approach. Check out
http://www.howtogeek.com/howto/17787...ub2-boot-menu/
for good, detailed instructions.
 
Old 09-12-2011, 05:13 AM   #8
masuch
Member
 
Registered: Sep 2011
Location: /dev/null
Distribution: ubuntu 64bits
Posts: 135

Rep: Reputation: 1
I have found more information in another post - which is what works for me:
----------------
If you have custom compiled kernel you need to remove following files/dirs:

/boot/vmlinuz*KERNEL-VERSION*
/boot/initrd*KERNEL-VERSION*
/boot/System-map*KERNEL-VERSION*
/boot/config-*KERNEL-VERSION*
/lib/modules/*KERNEL-VERSION*/
Update grub configuration file /etc/grub.conf or /boot/grub/menu.lst to point to correct kernel version.
----------------

---------- Post added 09-12-11 at 10:13 AM ----------

URL:
http://www.cyberciti.biz/faq/debian-...ernel-command/
 
  


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
Differences between the "free" and "paid" versions eraser Linux - General 4 11-18-2015 07:30 PM
tar "Error exit delayed from previous errors" using "-C /" ToK Linux - Software 2 03-19-2008 07:49 AM
How to make newer "tail" behave like older "tail" rylan76 Linux - Software 4 12-07-2007 05:27 AM
New kernels - removing older ones ?? bigjohn Ubuntu 18 12-10-2006 06:24 PM
Please explain "386" vs. "686" versions vinoloco Linux - Newbie 4 04-05-2005 08:03 PM


All times are GMT -5. The time now is 10:21 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