Removing old kernels - how many to keep?
Forum rules
There are no such things as "stupid" questions. However if you think your question is a bit stupid, then this is the right place for you to post it. Stick to easy to-the-point questions that you feel people can answer fast. For long and complicated questions use the other forums in the support section.
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
There are no such things as "stupid" questions. However if you think your question is a bit stupid, then this is the right place for you to post it. Stick to easy to-the-point questions that you feel people can answer fast. For long and complicated questions use the other forums in the support section.
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
-
- Level 5
- Posts: 602
- Joined: Mon Nov 24, 2014 8:53 am
Removing old kernels - how many to keep?
I am running Mint 19.1 XFCE on my Samsung RF511 laptop (8GB RAM, Intel Core i5 2.50 GHz CPU, 750 GB HDD). Not the latest and fastest laptop, but it works well. I'm in no rush to move to Mint 20. I am conscientious about updating, and of course the Software Manager now automatically includes and recommends kernel updates.
I just did the latest update. It included the latest recommended kernel for my setup, which is 4.15.0-109.
Just for interest, I had a look at the list of previous kernels. There were no less than 13 older ones, starting with 4.15.0-20 and then listing almost every kernel-upgrade from 4.15.0-55 onwards.
The guide and advice offered on the website of the very wise Pjotr suggests that more than one redundant kernel is superfluous. He also recommends activating the 'automatic kernel removal' option (which keeps just one old one as a backup). I like to err on the side of caution. Occasionally I have tried booted using various earlier kernels when trying to overcome sporadic wifi connection problems. But keeping more than a dozen does seem like overkill.
So should I remove most of them? They may take up storage space, but do they affect (=slow down) the operation of the system?
I just did the latest update. It included the latest recommended kernel for my setup, which is 4.15.0-109.
Just for interest, I had a look at the list of previous kernels. There were no less than 13 older ones, starting with 4.15.0-20 and then listing almost every kernel-upgrade from 4.15.0-55 onwards.
The guide and advice offered on the website of the very wise Pjotr suggests that more than one redundant kernel is superfluous. He also recommends activating the 'automatic kernel removal' option (which keeps just one old one as a backup). I like to err on the side of caution. Occasionally I have tried booted using various earlier kernels when trying to overcome sporadic wifi connection problems. But keeping more than a dozen does seem like overkill.
So should I remove most of them? They may take up storage space, but do they affect (=slow down) the operation of the system?
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
-
- Level 8
- Posts: 2297
- Joined: Sat Sep 17, 2016 6:40 pm
- Location: England
Re: Removing old kernels - how many to keep?
One old kernel should be the minimum. More than that is your choice. Bear in mind they take up quite a bit of space.
Cliff Coggin
Re: Removing old kernels - how many to keep?
I'd use Pjor's advice. As long as the previous one works, it's enough. will remove them, or you can use the Update Manager to remove them one at a time.
Code: Select all
sudo apt-get autoremove
Re: Removing old kernels - how many to keep?
You really shouldn't need more than 2 kernels, the current one & a backup. Having more than that is going to eat up your disk space. If you ever need a different kernel, just install it again.
Re: Removing old kernels - how many to keep?
br1anstorm wrote: ⤴Sat Jul 11, 2020 12:31 pm I am running Mint 19.1 XFCE on my Samsung RF511 laptop (8GB RAM, Intel Core i5 2.50 GHz CPU, 750 GB HDD). Not the latest and fastest laptop, but it works well. I'm in no rush to move to Mint 20. I am conscientious about updating, and of course the Software Manager now automatically includes and recommends kernel updates.
You are wise. There is no reason to upgrade to the next major or minor version if your existing OS version provides everything you need as long as you are still getting security updates. I think some people have nothing better to do with a computer than tinker with the desktop settings and install the next version of the OS. If they enjoy that more power to them. The more ambiguous beta testers the better for the next major release.
br1anstorm wrote: ⤴Sat Jul 11, 2020 12:31 pm I just did the latest update. It included the latest recommended kernel for my setup, which is 4.15.0-109.
Just for interest, I had a look at the list of previous kernels. There were no less than 13 older ones, starting with 4.15.0-20 and then listing almost every kernel-upgrade from 4.15.0-55 onwards.
...
So should I remove most of them? They may take up storage space, but do they affect (=slow down) the operation of the system?
The kernels are taking up space for sure, and they have no effect on the active kernel. I keep a very old kernel, most recent previous , and the active kernel. The Update Manger->View->Linux kernels->Remove old kernels has a nice user friendly interface to selectively clean up the kernels.
🐧Linux Mint 20.3 XFCE (UEFI - Secure Boot Enabled) dual boot with Windows 11
Give a friend a fish, and you feed them for a day. Teach a friend how to fish, and you feed them for a lifetime. ✝️
Give a friend a fish, and you feed them for a day. Teach a friend how to fish, and you feed them for a lifetime. ✝️
-
- Level 4
- Posts: 370
- Joined: Sun Aug 25, 2019 8:58 am
Re: Removing old kernels - how many to keep?
Ok, great, just when I thought I sorta had a reasonable understanding of what and how many kernels should or shouldn't be kept and/or deleted, here we go with this kernel thing again!
My system now shows that there are 40+ kernels spread out between 4.18 and 5.4 and no less than 40+ below the currently active 4.15.0-109, starting at 4.15.0-20 same as br1anstorm. All, with the exception of 4.15.0-108 & 109, are all labeled either Superseded or End Of Life.
My understanding is that anything marked Active or Installed are the only ones taking up disk space and all the Supercededs & EOLs are just there in name only using no disk space. So, can someone please confirm for me, are Supercededs & EOLs taking up disk space or not! If so, how do I get rid of them? Clicking on any Superseded or EOL kernel allows them ONLY to be installed but NOT removed! The only two that allow for removal are currently active & installed, 4.15.0.108 & 109!
As I have absolutely no intention of ever using anything other than LTS 4.15 what ever, I would like to delete any and all useless kernels that are taking up disk space on my computer. I have Update Manager Preferences set to Auto Maintenance so as to remove Obsolete kernels but the list just seems to keep growing, nothing ever seem to go away!
Any advise or questions are appreciated, thanks!
My system now shows that there are 40+ kernels spread out between 4.18 and 5.4 and no less than 40+ below the currently active 4.15.0-109, starting at 4.15.0-20 same as br1anstorm. All, with the exception of 4.15.0-108 & 109, are all labeled either Superseded or End Of Life.
My understanding is that anything marked Active or Installed are the only ones taking up disk space and all the Supercededs & EOLs are just there in name only using no disk space. So, can someone please confirm for me, are Supercededs & EOLs taking up disk space or not! If so, how do I get rid of them? Clicking on any Superseded or EOL kernel allows them ONLY to be installed but NOT removed! The only two that allow for removal are currently active & installed, 4.15.0.108 & 109!
As I have absolutely no intention of ever using anything other than LTS 4.15 what ever, I would like to delete any and all useless kernels that are taking up disk space on my computer. I have Update Manager Preferences set to Auto Maintenance so as to remove Obsolete kernels but the list just seems to keep growing, nothing ever seem to go away!
Any advise or questions are appreciated, thanks!
Re: Removing old kernels - how many to keep?
The only ones taking up space are the installed & active ones, no need to worry about the others. If you want to free up some more space, run;
Code: Select all
sudo apt autoremove
Re: Removing old kernels - how many to keep?
Only the Installed or Active reside in your root file system. If you hit the Remove old kernels button, it display a list of candidates to remove. They will only be the active or installed kernels.
🐧Linux Mint 20.3 XFCE (UEFI - Secure Boot Enabled) dual boot with Windows 11
Give a friend a fish, and you feed them for a day. Teach a friend how to fish, and you feed them for a lifetime. ✝️
Give a friend a fish, and you feed them for a day. Teach a friend how to fish, and you feed them for a lifetime. ✝️
Re: Removing old kernels - how many to keep?
when removing any of the Linux Kernels,
the very 1st kernel in any series is kept, for compatibility reasons,
as well as the latest kernel, and sometimes even, the second latest kernel, as well.
thus, all the other Linux Kernels .. can be safely removed.
is one way, to remove those other Linux Kernels.
also, in the LM20 series, and within the Update Manager, there is an Automation option,
that is under Preferences, that will also Auto-Remove those older Linux Kernels.
the very 1st kernel in any series is kept, for compatibility reasons,
as well as the latest kernel, and sometimes even, the second latest kernel, as well.
thus, all the other Linux Kernels .. can be safely removed.
Code: Select all
sudo apt autoremove
also, in the LM20 series, and within the Update Manager, there is an Automation option,
that is under Preferences, that will also Auto-Remove those older Linux Kernels.
Please edit your original post title to include [SOLVED] - when your problem is solved!
and DO LOOK at those Unanswered Topics - - you may be able to answer some!.
-
- Level 4
- Posts: 370
- Joined: Sun Aug 25, 2019 8:58 am
Re: Removing old kernels - how many to keep?
Thank you all for the response! So I guess I'm good then as 4.15.0-109 is Active and 108 is Installed. If I click on the Remove button it shows 108 as the only one that can be removed but I'll keep it as other suggest. I just hate computer clutter and hate seeing all those useless kernels listed there doing nothing. But, as long as they aren't using disk space I guess I can live with it. But, that's just me!
Thanks again.
Thanks again.
Re: Removing old kernels - how many to keep?
If you hate clutter, have you done cleanup? Special attention to section 10 https://easylinuxtipsproject.blogspot.c ... -mint.html
Re: Removing old kernels - how many to keep?
Deleting a kernel removes about 300 MB. Deleting an unused KDE based application can free up 500 MB. I keep a little list of cleanups to do once per month. For kernels, I keep at least a month of updates because some do not work with devices I plug in occasionally.
-
- Level 4
- Posts: 370
- Joined: Sun Aug 25, 2019 8:58 am
Re: Removing old kernels - how many to keep?
Used it early on when I first started using Linux, then forgot about it! Thanks for reminding me of it!LanceM wrote: ⤴Mon Jul 13, 2020 5:43 pm If you hate clutter, have you done cleanup? Special attention to section 10 https://easylinuxtipsproject.blogspot.c ... -mint.html
Re: Removing old kernels - how many to keep?
That liked page is interesting. Similar to what I do. I tested the remove fonts. 124 MB saved. Less than one kernel.