Fedora Linux Support Community & Resources Center

Go Back   FedoraForum.org > Fedora 17/18 > Using Fedora
FedoraForum Search

Forgot Password? Join Us!

Using Fedora General support for current versions. Ask questions about Fedora and it's software that do not belong in any other forum.

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 6th August 2012, 03:07 PM
johnnyhop Offline
Registered User
 
Join Date: Jan 2012
Location: Baltimore, USA
Posts: 8
linuxfirefox
Cool How do I remove old kernels?

Fedora is my first dabble with a non-Debian distro, I'm still getting used to it and am pleased with the experience. My preference is to keep the current and immediately previous kernals installed and delete older kernels. Installed are 3.4.4-4, 3.4.6-1 and 3.4.7-1 and I'd like to remove 3.4.4-4. I'd appreciate any suggestions.
Reply With Quote
  #2  
Old 6th August 2012, 03:20 PM
sea's Avatar
sea Online
"Shells" (of a sub world)
 
Join Date: May 2011
Location: Helvetic Federation (Swissh)
Age: 33
Posts: 2,647
windows_7chrome
Re: How do I remove old kernels?

At first you should be aware, that it is highly recommended to keep up to the last 3 kernel as Fedora has the most current ones, and with that, sometimes the most unstable ones...

Either way, to delete old and unwanted kernels, have a look into /boot.
Select those files that match the kernel version you want to delete. (THIS IS DANGEROUS, AND MIGHT CAUSE YOUR SYSTEM TO BE NOT BOOTABLE!)
And assuming its grub2, be sure to rebuild the grub config with : grub2-mkconfig -o /boot/grub2/grub.cfg
__________________
Notebook: Samsung NC210/NC110 CPU: Intel 2*1600 Mhz RAM: 1024 MB DDR2 OS: Fedora 19 DE: Awesome
Laptop: Toshiba Satellite L670 CPU: Intel(r) 2*1872 Mhz RAM: 3072 MB DDR3 OS: Fedora 17 DE: Awesome
Fedora Manual (RTFM) | The Linux Documentation Project | Script-Tools
Reply With Quote
  #3  
Old 6th August 2012, 03:45 PM
nonamedotc's Avatar
nonamedotc Offline
Formerly known as"professorrmd"
 
Join Date: Mar 2011
Posts: 2,731
linuxfedorafirefox
Re: How do I remove old kernels?

Alternatively, use yum to remove the unwanted kernel(s). For example, in my case,

Code:
yum remove kernel-3.4.5-2.fc17
You can also configure how many kernels you want to retain by changing the corresponding value in /etc/yum.conf. The default is 3.

Code:
cat /etc/yum.conf 
[main]
cachedir=/var/cache/yum/$basearch/$releasever
keepcache=0
debuglevel=2
logfile=/var/log/yum.log
exactarch=1
obsoletes=1
gpgcheck=1
plugins=1
installonly_limit=3
Reply With Quote
  #4  
Old 6th August 2012, 04:38 PM
stoat Offline
Registered User
 
Join Date: Jun 2006
Posts: 7,551
linuxfirefox
Re: How do I remove old kernels?

Quote:
Originally Posted by sea

Either way, to delete old and unwanted kernels, have a look into /boot.
Select those files that match the kernel version you want to delete.
You're right. That works. In fact, I have to delete kernels that way because I use a Linux from Scratch system in which everything in it was manually compiled. But just deleting the stuff in /boot leaves behind the kernel's modules folder, and sometimes its documentation. I have to delete those folders manually, too. So for a system like Fedora, the better idea probably is to delete unwanted kernels with its package manager to avoid leaving stuff behind.
Reply With Quote
  #5  
Old 6th August 2012, 04:50 PM
johnnyhop Offline
Registered User
 
Join Date: Jan 2012
Location: Baltimore, USA
Posts: 8
linuxfirefox
Re: How do I remove old kernels?

Thank you, I"ll use Yum, it sounds safest and most complete. I'll only do this afrter the current kernel proves stable.
Reply With Quote
  #6  
Old 9th August 2012, 06:51 AM
cryogenic666 Offline
Registered User
 
Join Date: Oct 2010
Location: Knoxville, TN
Posts: 35
linuxfirefox
Re: How do I remove old kernels?

Quote:
Originally Posted by johnnyhop View Post
Thank you, I"ll use Yum, it sounds safest and most complete. I'll only do this afrter the current kernel proves stable.
The point here was that you don't NEED to manually remove the old kernels. If you leave the "installonly" variably at 3, it'll always keep three installed. When you go to install a new one, it'll delete the oldest one such that you have the latest + 2 older. Change it to two and you'll always have the latest + one older. But regardless, yum will auto-remove any kernels beyond the limit you set.
Reply With Quote
Reply

Tags
kernels, remove

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Remove old Kernels? thebean Fedora Focus 16 22nd August 2012 12:49 AM
Remove unwanted kernels dpawson Using Fedora 14 2nd April 2010 07:43 AM
How Can I Remove Old Kernels in Fedora 8 thedude165 Using Fedora 7 6th November 2009 06:26 PM
How to remove unwanted kernels larryt Using Fedora 6 4th August 2007 07:04 PM
Should I remove old kernels wcobb Using Fedora 6 5th March 2005 04:38 AM


Current GMT-time: 16:31 (Wednesday, 19-06-2013)

TopSubscribe to XML RSS for all Threads in all ForumsFedoraForumDotOrg Archive
logo

All trademarks, and forum posts in this site are property of their respective owner(s).
FedoraForum.org is privately owned and is not directly sponsored by the Fedora Project or Red Hat, Inc.

Privacy Policy | Term of Use | Posting Guidelines | Archive | Contact Us | Founding Members

Powered by vBulletin® Copyright ©2000 - 2012, vBulletin Solutions, Inc.

FedoraForum is Powered by RedHat