Shouldn MX Cleanup have an option to automatically delete old kernels after a user specified number of days ?

Help for Current Versions of MX
When asking for help, use Quick System Info from MX Tools. It will be properly formatted using the following steps.
1. Click on Quick System Info in MX Tools
2. Right click in your post and paste.
Message
Author
AA BB
Posts: 391
Joined: Mon Nov 11, 2019 10:49 pm

Shouldn MX Cleanup have an option to automatically delete old kernels after a user specified number of days ?

#1 Post by AA BB »

MX cleanup doesnt delete old kernels, so over time they pile up wasting disk space.
It seems to me there is no point is saving more than one old kernel.
Should MX Cleanup have an option to automatically delete old kernels after a user specified number of days ?

User avatar
dolphin_oracle
Developer
Posts: 22655
Joined: Sun Dec 16, 2007 12:17 pm

Re: Shouldn MX Cleanup have an option to automatically delete old kernels after a user specified number of days ?

#2 Post by dolphin_oracle »

It does remove old kernels just not automatically.
http://www.youtube.com/runwiththedolphin
lenovo ThinkPad X1 Extreme Gen 4 - MX-23
FYI: mx "test" repo is not the same thing as debian testing repo.
Live system help document: https://mxlinux.org/wiki/help-antix-live-usb-system/

retroD0d0
Posts: 81
Joined: Sat Aug 17, 2024 4:36 pm

Re: Shouldn MX Cleanup have an option to automatically delete old kernels after a user specified number of days ?

#3 Post by retroD0d0 »

Hi, doesn't

Code: Select all

sudo apt autoremove
remove them for you?

edit/ I see, you mean add that to the cron joblist? good idea i suppose, but since running 'apt autoremove' is such a common maintenance task I can see why the devs didn't think it was necessary.

User avatar
Adrian
Developer
Posts: 9183
Joined: Wed Jul 12, 2006 1:42 am

Re: Shouldn MX Cleanup have an option to automatically delete old kernels after a user specified number of days ?

#4 Post by Adrian »

It could be a bit dangerous, sometimes things get marked as autoremovable that you don't want to remove, I think it requires user approval not an automatic job -- I mean if that was considered OK, why doesn't Debian do that by default?

Also, it's configuration dependent, I think by default it removes the second to last older kernel, it doesn't remove the previous old kernel, so if you have something like .14, .15, .16 (where .16 is the latest) it would remove the -14 and leave .15 and .16 on your computer).

User avatar
asqwerth
Developer
Posts: 8032
Joined: Sun May 27, 2007 5:37 am

Re: Shouldn MX Cleanup have an option to automatically delete old kernels after a user specified number of days ?

#5 Post by asqwerth »

IIRC, a pop up reminder will show up during an upgrade if your /boot [assuming it's a separate partition] is too full with kernels. So at least there is a reminder at an crucial point in time.

Otherwise, I'm not sure I'm comfortable with the system automatically removing kernels for me without notice,
Desktop: Intel i5-4460, 16GB RAM, Intel integrated graphics
Clevo N130WU-based Ultrabook: Intel i7-8550U (Kaby Lake R), 16GB RAM, Intel integrated graphics (UEFI)
ASUS X42D laptop: AMD Phenom II, 6GB RAM, Mobility Radeon HD 5400

User avatar
m_pav
Developer
Posts: 1857
Joined: Sun Aug 06, 2006 3:02 pm

Re: Shouldn MX Cleanup have an option to automatically delete old kernels after a user specified number of days ?

#6 Post by m_pav »

With Linux, unlike MS and Apple, YOU are the highest level Administrator, nobody trumps you, therefore, with great power comes great responsibility and accountability for your own machine, which means you have the job of a systems administrator, maintaining your own machine/s ;)

To give that away as a Linux user is to reduce yourself to the level of a fish in a bowl, in other words, the equivalent to a Windows home edition or an Apple user :lockedup:
Mike P

Regd Linux User #472293
(Daily) Lenovo T560, i7-6600U, 16GB, 2.0TB SSD, MX_ahs
(ManCave) AMD Ryzen 5 5600G, 32G, 8TB mixed, MX_ahs
(Spare)2017 Macbook Air 7,2, 8GB, 256GB SSD, MX_ahs

User avatar
DukeComposed
Posts: 1499
Joined: Thu Mar 16, 2023 1:57 pm

Re: Shouldn MX Cleanup have an option to automatically delete old kernels after a user specified number of days ?

#7 Post by DukeComposed »

m_pav wrote: Tue Apr 29, 2025 1:40 am With Linux, unlike MS and Apple, YOU are the highest level Administrator, nobody trumps you, therefore, with great power comes great responsibility and accountability for your own machine, which means you have the job of a systems administrator
While it's true that Linux requires users to develop a good deal of system administration experience, nobody complains because logs get rotated automatically, either. Maybe another way to look at this is from the opposite direction: "How would people feel if automatic kernel pruning was the default?"

Sure, this one particular user would be happy and probably have a slim /boot partition. Meanwhile, a lot of people who don't update their kernels every other week are going to be out of luck when the last good kernel they used six month ago gets purged without their knowledge or consent.

And "consent" is a big one here, because there are plenty of users, on this forum and off of it, who clean their systems of any "extra" files with an aggressive, zealous fervor. People don't come here to create threads saying "I ran BleachBit with all the checkboxes checked and lost something important, but that's OK,I understand it was my fault and I'm not going to make a big deal about it."

Kernels are not a "get rid of old ones every so often and don't worry about it" thing. Kernels are where the drivers live, and drivers dictate whether or not your hardware works. So a user wiping an old kernel from his or her machine might inadvertently render their machine unusable, and in a way that could be very difficult to undo without a backup as old as the kernel. Some folks have a daily driver kernel and a tinkering/gaming/experimental kernel and they don't necessarily track new kernels as vociferously as you do.

If you want this functionality on your system you can write a script to wipe old kernels and schedule it to run with a cronjob. There's no need to ask the MX devs to write a "shoot self in foot" button into MX Cleanup to do it for you. But before you go and write that script and run it, ask yourself what you're going to do if you get the script wrong and it accidentally removes a kernel it shouldn't have removed.

And then I think you'll have your answer.

User avatar
oops
Posts: 2013
Joined: Tue Apr 10, 2018 5:07 pm

Re: Shouldn MX Cleanup have an option to automatically delete old kernels after a user specified number of days ?

#8 Post by oops »

... It is not a good idea to remove a kernel engine automaticaly.
Pour les nouveaux utilisateurs: Alt+F1 pour le manuel, ou FAQS, MX MANUEL, et Conseils MX Conseils Debian - Info. système “quick-system-info-mx” (QSI) ... Ici: System: MX-19-23_x64 & antiX23_x32 runit

User avatar
MikeR
Posts: 258
Joined: Sun Jun 25, 2023 6:42 am

Re: Shouldn MX Cleanup have an option to automatically delete old kernels after a user specified number of days ?

#9 Post by MikeR »

My $0.02: as a long-time (several decades) Linux user, I'm with @oops !!
Also you could check out /usr/bin/cleanup-notifier-mx
(written by one of the gurus on this forum)

HTH
Old RSTS hack
Registered Linux user #542196

AA BB
Posts: 391
Joined: Mon Nov 11, 2019 10:49 pm

Re: Shouldn MX Cleanup have an option to automatically delete old kernels after a user specified number of days ?

#10 Post by AA BB »

If MX Cleanup cant safely remove large amounts wasteful disk space it should be eliminated.
I dont see how saving every previous Linux kernel insures system safety,
MX Cleanup keeping the current kernel plus one or two previous ones should be sufficient safety.

PS: Today's update to MX Cleanup has eliminated ALL out-of-date kernel removal... overkill, for sure

Post Reply

Return to “MX Help”