Ok, I haven't used Linux Mint and Ubuntu for a while so this may be fixed, but many users I see in like Reddit or Lemmy complain that Linux Mint don't automatically remove old kernels.
Old kernels takes space in the disks or boot partition and updating may have a risk of unexplained errors or even worse an unbootable system.
I know that there's an option to automatically remove old kernels and packages, but it seems it is not enabled by default, and most users, especially non-technical users may not enable this option. And that option I heard need root permission, a polkit password prompt can be annoying for user.
So, if the Linux Mint develoers haven't implemented this default, I think it's better to add this as default, maybe adding an user group and polkit policies and some kind of cron jobs (I heard systemd has a feature similar to crond) to do it automatically without prompt for user's password.
Thanks for reading!
Automatically remove old kernels when updating by default
Forum rules
Do not post support questions here. Before you post read the forum rules. Topics in this forum are automatically closed 6 months after creation.
Do not post support questions here. Before you post read the forum rules. Topics in this forum are automatically closed 6 months after creation.
-
- Level 1
- Posts: 5
- Joined: Sat Sep 02, 2023 10:15 pm
Automatically remove old kernels when updating by default
Last edited by LockBot on Sun Mar 03, 2024 11:00 pm, 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.
Re: Automatically remove old kernels when updating by default
Then they should probably come here for advice rather than remain there.but many users I see in like Reddit or Lemmy complain that Linux Mint don't automatically remove old kernels.
Mint does, indeed, allow for the automatic removal of old kernels..
Update Manager - Edit - Preferences - Automation Tab..
-
- Level 1
- Posts: 5
- Joined: Sat Sep 02, 2023 10:15 pm
Re: Automatically remove old kernels when updating by default
But I still think many newbies still don't understand what's kernel and how it is relevant to their system. I just suggest enable that option, maybe also setup like Timeshift for an weekly snapshot so that even when newbies ignore most of the post-installation setup and not aware/understand of Linux Mint options the defaults may not screw them up or help them when an update breaks at some time.
-
- Level 1
- Posts: 5
- Joined: Sat Sep 02, 2023 10:15 pm
Re: Automatically remove old kernels when updating by default
Maybe you can add a button next to the option that when hover or click on it, show a dialog like (the kernel is one of the most important part of a Linux Mint system. Enable it when your boot partition is almost full or you need free space, and make sure to properly configure system snapshot tools like Timeshift)
Re: Automatically remove old kernels when updating by default
An issue is that some users are going to need one of those old kernels because one of the newer ones won't work with something, and that's going to make life much more difficult for them. There's no one right answer for everyone.
For every complex problem there is an answer that is clear, simple, and wrong - H. L. Mencken
-
- Level 1
- Posts: 5
- Joined: Sat Sep 02, 2023 10:15 pm
Re: Automatically remove old kernels when updating by default
Maybe just put some limit on how many old kernels being kept even when the option is off, and when the option is on keep only the latest and one old kernel
Re: Automatically remove old kernels when updating by default
That's what happens when you do in CLI, that's how I get rid of old kernels (and also other unneeded programs/libraries).
Code: Select all
sudo apt autoremove
For every complex problem there is an answer that is clear, simple, and wrong - H. L. Mencken
-
- Level 1
- Posts: 5
- Joined: Sat Sep 02, 2023 10:15 pm
Re: Automatically remove old kernels when updating by default
I mean having a limit of how many old kernels based on boot or efi partition of the user, not keeping them almost indefinitely until the user notices it. Most average users don't even know they are almost running out of disk space untip somethings notices them clearly so, and I have heard of many new Linux users following very outdated guides which leads to having a seperate too small boot/efi partition or sharing the efi partition with Windows, or blindly follow installation guides in the Internet without knowing the implications of their actions
- Midnight True
- Level 7
- Posts: 1549
- Joined: Wed Jul 20, 2022 3:23 am
- Location: Southern and Southwestern area of Mato
- Contact:
Re: Automatically remove old kernels when updating by default
Personally i turn off
during updates which includes the kernel. For i use 6.2 HWE kernel but i want to keep 5.15.0-76 LTS kernel.
On my case
remove obsolete kernels and dependencies
and being wary of apt autoremove
during updates which includes the kernel. For i use 6.2 HWE kernel but i want to keep 5.15.0-76 LTS kernel.
On my case
remove obsolete kernels and dependencies
attempts to remove 5.15 if a 6.2 is updated and i felt uncomfortable with that. In my opinion it would be nice for new Mint user if Mint team can make a Mint app for cleaning (Same as MX Linux Cleanup or Bleach Bit)