Allow Update Manager to remove several old kernels
Forum rules
Do not post support questions here. Before you post read: Where to post ideas & feature requests
Do not post support questions here. Before you post read: Where to post ideas & feature requests
Allow Update Manager to remove several old kernels
It would be very convenient if several old kernels could be removed at the same time in Update Manager. Currently, Update Manager can only remove one at a time, and each time requires one to re-enter the root password.
I'm aware that there are already ways to do this:
viewtopic.php?t=234076
viewtopic.php?t=238519
but my point is usability. Kernels pile up over time, so wanting to remove several old ones is probably the most common use case, not the exception. Update Manager / Linux Kernels is the obvious place to look for this functionality because Update Manager is where you install new kernels.
I'm aware that there are already ways to do this:
viewtopic.php?t=234076
viewtopic.php?t=238519
but my point is usability. Kernels pile up over time, so wanting to remove several old ones is probably the most common use case, not the exception. Update Manager / Linux Kernels is the obvious place to look for this functionality because Update Manager is where you install new kernels.
Re: Allow Update Manager to remove several old kernels
Got to second this one. Would be a massive improvement and addresses a use case I suspect many will encounter.
- Pjotr
- Level 24
- Posts: 20132
- Joined: Mon Mar 07, 2011 10:18 am
- Location: The Netherlands (Holland) 🇳🇱
- Contact:
Re: Allow Update Manager to remove several old kernels
Good idea. In the meantime, you can use this method:
https://sites.google.com/site/easylinux ... one-stroke
(item 7.1, right column)
https://sites.google.com/site/easylinux ... one-stroke
(item 7.1, right column)
Tip: 10 things to do after installing Linux Mint 21.3 Virginia
Keep your Linux Mint healthy: Avoid these 10 fatal mistakes
Twitter: twitter.com/easylinuxtips
All in all, horse sense simply makes sense.
Keep your Linux Mint healthy: Avoid these 10 fatal mistakes
Twitter: twitter.com/easylinuxtips
All in all, horse sense simply makes sense.
Re: Allow Update Manager to remove several old kernels
Of course, I will not object to improving Update Manager.
Yet, seems a bit as if not everyone is aware that already today, using Synaptic Package Manager, you can mark the kernel packages which you wish to uninstall and select "complete removal (purge)". In one go, password requested only once, before Synaptic is launched with root privileges.
This is what I have been doing since the times of Karmic Koala.
Whenever the number of installed kernels had grown to 6 or more, I have marked all the packages which belonged to the oldest 3 or 4 kernels and removed them from inside Synaptic Package Manager. Sample below.
(Click screenshot to enlarge. Press <alt><cursor left> to return here.)
Yet, seems a bit as if not everyone is aware that already today, using Synaptic Package Manager, you can mark the kernel packages which you wish to uninstall and select "complete removal (purge)". In one go, password requested only once, before Synaptic is launched with root privileges.
This is what I have been doing since the times of Karmic Koala.
Whenever the number of installed kernels had grown to 6 or more, I have marked all the packages which belonged to the oldest 3 or 4 kernels and removed them from inside Synaptic Package Manager. Sample below.
(Click screenshot to enlarge. Press <alt><cursor left> to return here.)
The people of Alderaan have been bravely fighting back the clone warriors sent out by the unscrupulous Sith Lord Palpatine for 792 days now.
Lifeline
-
- Level 1
- Posts: 48
- Joined: Wed Jul 29, 2009 5:07 pm
Re: Allow Update Manager to remove several old kernels
This would be good if the update man is could do this
Re: Allow Update Manager to remove several old kernels
Not to be a trouble maker but I would not be so quick to remove old kernels - for sure leave the last one prior to the updated one. IMHO it is probably a good thing not to make it so easy to remove old kernels in the update manager. I do get it that having an inordinate number of kernels takes some space. I often have six or so with no impact on performance or memory space issues.
Over a year or so ago I went through a an exercise to "clean up" my system to see how much space I would gain and if i would notice any performance gain. I cleaned out thumbnail cache, empty the trash, got rid of old kernels, cleaned out /tmp and /.cache in my home dir maybe a few other items that I looked into. The results were less than startling - I can't recall how much space I reclaimed but it maybe a few hundred KB - basically nothing. And no performance gain at all - nada, none. So why bother except for every few months just because . . . .?
Over a year or so ago I went through a an exercise to "clean up" my system to see how much space I would gain and if i would notice any performance gain. I cleaned out thumbnail cache, empty the trash, got rid of old kernels, cleaned out /tmp and /.cache in my home dir maybe a few other items that I looked into. The results were less than startling - I can't recall how much space I reclaimed but it maybe a few hundred KB - basically nothing. And no performance gain at all - nada, none. So why bother except for every few months just because . . . .?
Re: Allow Update Manager to remove several old kernels
How about leaving the last two working kernels, in addition to the current one, then when installing a new one, remove the oldest? That way you would always only have three installed kernels. (I don't understand why anyone would let them pile up so much.)
But to be on topic, I do agree it would be an improvement if the Update Manager could remove more than one at a time.
But to be on topic, I do agree it would be an improvement if the Update Manager could remove more than one at a time.
Re: Allow Update Manager to remove several old kernels
I do that, but it's not as simple as it should be.
For example, to remove kernel 4.4.0-101 and the associated stuff, there is what - 3, 4 packages? You see in your picture that the 4.4.0-101 packages are spread around. So you search for "4.4.0-101" and remove those.
So --> It'd be nice if there were a "meta" package for each kernel.
Please edit your original post title to include [SOLVED] if/when it is solved!
Your data and OS are backed up....right?
Your data and OS are backed up....right?
Re: Allow Update Manager to remove several old kernels
This would make things so much easier. My boot sector can only store about 6 kernels. So I regularly have to clear some out - it's a routine maintenance task, which I sometimes forget. It would be great if I could set how many old kernels I wanted to keep, and then have each kernel update maintain that. And as is evident from this post, I am not alone in this wish.
Re: Allow Update Manager to remove several old kernels
This is not the boot sector, rather it is a dedicated filesystem, mounted under the name of
/boot
.Note:
In case you had not created a dedicated filesystem for "boot",
/boot
would merely be a sub-directory of the root filesystem /
.The people of Alderaan have been bravely fighting back the clone warriors sent out by the unscrupulous Sith Lord Palpatine for 792 days now.
Lifeline
Re: Allow Update Manager to remove several old kernels
i believe that gm10 has been able to get that feature included in the newest LM 19.1 where in the update manager, in the linux kernels section, you should now find check mark boxes contained within, that now allow for multiple old kernel deletions all at once simply by filling the boxes with check marks for the kernels that one would want removed...thank gm10 when you see him next in the forums...lol...DAMIEN
scroll down till you see "A new button was added to make it easier to remove unused kernels:"
https://www.linuxmint.com/rel_tessa_cin ... atsnew.php
scroll down till you see "A new button was added to make it easier to remove unused kernels:"
https://www.linuxmint.com/rel_tessa_cin ... atsnew.php
- Pjotr
- Level 24
- Posts: 20132
- Joined: Mon Mar 07, 2011 10:18 am
- Location: The Netherlands (Holland) 🇳🇱
- Contact:
Re: Allow Update Manager to remove several old kernels
Correct. See also this how-to with screenshots:DAMIEN1307 wrote: ⤴Thu Dec 20, 2018 6:31 am i believe that gm10 has been able to get that feature included in the newest LM 19.1 where in the update manager, in the linux kernels section, you should now find check mark boxes contained within, that now allow for multiple old kernel deletions all at once simply by filling the boxes with check marks for the kernels that one would want removed...thank gm10 when you see him next in the forums...lol...DAMIEN
scroll down till you see "A new button was added to make it easier to remove unused kernels:"
https://www.linuxmint.com/rel_tessa_cin ... atsnew.php
https://easylinuxtipsproject.blogspot.c ... html#ID9.1
(item 9.1)
And gm10 is indeed the guy to thank for that.
Tip: 10 things to do after installing Linux Mint 21.3 Virginia
Keep your Linux Mint healthy: Avoid these 10 fatal mistakes
Twitter: twitter.com/easylinuxtips
All in all, horse sense simply makes sense.
Keep your Linux Mint healthy: Avoid these 10 fatal mistakes
Twitter: twitter.com/easylinuxtips
All in all, horse sense simply makes sense.
Re: Allow Update Manager to remove several old kernels
There's another little undocumented change in LM19.1's Update Manager in that it forces you onto the kernel meta-package and keeps you there. One effect of that is that all kernels you automatically updated via Update Manager can also be removed via a simple
This automatically keeps a previous version. I had also provided automation in Update Manager for that but that feature has not been approved by Clem yet and didn't make it into 19.1. Only kernels you install manually via the kernel window you always need to manually remove from the kernel window again. They will not be removed by the command above to allow you to keep a specific version.
Further in that respect Pjotr, you wrote on your linked site:
This will get you the 4.18 kernel series. Nobody should read this as a suggestion to actually run that command. You should stick with the 4.15 LTS kernel if it's all the same to you (see Pjotr's site for the explanation ).
There's still some logic I want to add with respect to automatically offering to upgrade to the higher series tough. So far I was thinking along these lines: https://github.com/linuxmint/mintupdate/issues/440 - feel free to add to that should I have missed something and/or you disagree.
Code: Select all
apt autoremove --purge
Further in that respect Pjotr, you wrote on your linked site:
19.2+ won't automatically upgrade you to a higher series unless you clean install it. Nor will Update Manager, it will keep you on the 4.15 series unless you manually put it on the HWE kernel upgrade path, which you can do right now, if you want to, no need to wait for 19.2:There's an important exception to this rule, which has to do with security. From Mint 19.2 onward, if you want to have a secure kernel, you'll need to upgrade your kernel pretty soon to a higher series. Or downgrade it to the 4.15 kernel series. That's because the short-lived kernel series with which Mint 19.2 and 19.3 will be released, will only be supported for a couple of months.
Code: Select all
apt install linux-generic-hwe-18.04
There's still some logic I want to add with respect to automatically offering to upgrade to the higher series tough. So far I was thinking along these lines: https://github.com/linuxmint/mintupdate/issues/440 - feel free to add to that should I have missed something and/or you disagree.
- Pjotr
- Level 24
- Posts: 20132
- Joined: Mon Mar 07, 2011 10:18 am
- Location: The Netherlands (Holland) 🇳🇱
- Contact:
Re: Allow Update Manager to remove several old kernels
You're right. I'll make that text a bit clearer.gm10 wrote: ⤴Thu Dec 20, 2018 7:53 am Further in that respect Pjotr, you wrote on your linked site:19.2+ won't automatically upgrade you to a higher series unless you clean install it.There's an important exception to this rule, which has to do with security. From Mint 19.2 onward, if you want to have a secure kernel, you'll need to upgrade your kernel pretty soon to a higher series. Or downgrade it to the 4.15 kernel series. That's because the short-lived kernel series with which Mint 19.2 and 19.3 will be released, will only be supported for a couple of months.
Like you, I'm of the opinion that if your system is already running well on the LTS kernel, there's no need to board the HWE rollercoaster. So no notifications are needed then about a newer HWE kernel being available. In my opinion, such a notification would only be confusing and might lead to undesirable behaviour....gm10 wrote: ⤴Thu Dec 20, 2018 7:53 amThere's still some logic I want to add with respect to automatically offering to upgrade to the higher series tough. So far I was thinking along these lines: https://github.com/linuxmint/mintupdate/issues/440 - feel free to add to that should I have missed something and/or you disagree.
For completeness' sake (Gründlichkeit) I'll post this comment also on GitHub.
Tip: 10 things to do after installing Linux Mint 21.3 Virginia
Keep your Linux Mint healthy: Avoid these 10 fatal mistakes
Twitter: twitter.com/easylinuxtips
All in all, horse sense simply makes sense.
Keep your Linux Mint healthy: Avoid these 10 fatal mistakes
Twitter: twitter.com/easylinuxtips
All in all, horse sense simply makes sense.
Re: Allow Update Manager to remove several old kernels
I hear you and it's one of my concerns, but people are going to install them, anyway, so I think the minimum we need is to offer to install the HWE meta once an installed HWE kernel is detected to ensure they are being kept up to date. You could say "responsibility of the user" and you would be correct, but Mint caters to newbie users so we gotta save them from themselves at times.Pjotr wrote: ⤴Thu Dec 20, 2018 11:35 am Like you, I'm of the opinion that if your system is already running well on the LTS kernel, there's no need to board the HWE rollercoaster. So no notifications are needed then about a newer HWE kernel being available. In my opinion, such a notification would only be confusing and might lead to undesirable behaviour....
As far as I recall LM19 code the LM19 users will get 4.18 in their list of upgrades no matter what btw. At least I stopped that madness in LM19.1.