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

6th August 2012, 03:07 PM
|
|
Registered User
|
|
Join Date: Jan 2012
Location: Baltimore, USA
Posts: 8

|
|
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.
|

6th August 2012, 03:20 PM
|
 |
"Shells" (of a sub world)
|
|
Join Date: May 2011
Location: Helvetic Federation (Swissh)
Age: 33
Posts: 2,647

|
|
|
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
|

6th August 2012, 03:45 PM
|
 |
Formerly known as"professorrmd"
|
|
Join Date: Mar 2011
Posts: 2,731

|
|
|
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
|

6th August 2012, 04:38 PM
|
|
Registered User
|
|
Join Date: Jun 2006
Posts: 7,551

|
|
|
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.
|

6th August 2012, 04:50 PM
|
|
Registered User
|
|
Join Date: Jan 2012
Location: Baltimore, USA
Posts: 8

|
|
|
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.
|

9th August 2012, 06:51 AM
|
|
Registered User
|
|
Join Date: Oct 2010
Location: Knoxville, TN
Posts: 35

|
|
|
Re: How do I remove old kernels?
Quote:
Originally Posted by johnnyhop
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.
|
| Thread Tools |
Search this Thread |
|
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
Current GMT-time: 16:31 (Wednesday, 19-06-2013)
|
|
 |
 |
 |
 |
|
|