When updating kernel suggest cleaning up old ones if /boot is running low on space

Suggestions and feedback for Linux Mint and the forums
Forum rules
Do not post support questions here. Before you post read: Where to post ideas & feature requests
Post Reply
User avatar
Lappro
Level 1
Level 1
Posts: 4
Joined: Thu Jan 10, 2019 11:01 am

When updating kernel suggest cleaning up old ones if /boot is running low on space

Post by Lappro »

I just thought of this feature request because while updating my kernel, I got some "initramfs" error while updating.
Now I did think of checking my /boot space and saw it was low, so cleaned up some old kernels because I had like 7 installed. More than necessary for me.

Less experienced users might stumble there and not know what to do.
I think it would be nice if the Update Manager would suggest removing some old kernels when your /boot space is running low.
It could do this either periodically or just before installing a new kernel.

My /boot disk usage when I got the initramfs error was about 94%.
My disk usage after cleaning up was 33%.
The /boot partition total size is 705MB for me.

So I guess somewhere between 50% and 80% would be a good range to starting throwing such a hint.

What do others think of this idea?
User avatar
Pjotr
Level 23
Level 23
Posts: 19886
Joined: Mon Mar 07, 2011 10:18 am
Location: The Netherlands (Holland) 🇳🇱
Contact:

Re: When updating kernel suggest cleaning up old ones if /boot is running low on space

Post by Pjotr »

Clearly something needs to be done. The current accumulation of obsolete kernels serves no earthly purpose.

I'd like a more simple solution: in the Preferences of Update Manager, section Automation, the automatic maintenance feature for kernels should be enabled by default.

This will automatically preserve only one older kernel as a spare, and will never remove any other kernels that you've installed by hand.

Just a different default preference. Requires no effort from the devs. :mrgreen:
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.
t42
Level 11
Level 11
Posts: 3709
Joined: Mon Jan 20, 2014 6:48 pm

Re: When updating kernel suggest cleaning up old ones if /boot is running low on space

Post by t42 »

Is sudo apt-get --purge autoremove command not good enough?
-=t42=-
User avatar
Lappro
Level 1
Level 1
Posts: 4
Joined: Thu Jan 10, 2019 11:01 am

Re: When updating kernel suggest cleaning up old ones if /boot is running low on space

Post by Lappro »

The problem isn't so much that cleaning up is hard or something. Because that is indeed easy.
However when you forget to cleanup or haven't automated it, you can encounter obscure errors which especially new users probably don't know what to do with. And that problem is easily avoided if you do cleanup.

Setting the auto cleanup kernels to on by default is a suitable solution.
Or implementing a check to guide users to cleanup when necessary is another, although it requires more work.
User avatar
Moem
Level 22
Level 22
Posts: 16226
Joined: Tue Nov 17, 2015 9:14 am
Location: The Netherlands
Contact:

Re: When updating kernel suggest cleaning up old ones if /boot is running low on space

Post by Moem »

t42 wrote: Thu Apr 15, 2021 5:29 am Is sudo apt-get --purge autoremove command not good enough?
How will a newcomer ever know that command, and know how to run it and when?
Image

If your issue is solved, kindly indicate that by editing the first post in the topic, and adding [SOLVED] to the title. Thanks!
t42
Level 11
Level 11
Posts: 3709
Joined: Mon Jan 20, 2014 6:48 pm

Re: When updating kernel suggest cleaning up old ones if /boot is running low on space

Post by t42 »

Moem wrote: Thu Apr 15, 2021 6:02 am How will a newcomer ever know that command, and know how to run it and when?
It's a valid argument. Still we should try to teach newcomers ...somehow.
-=t42=-
User avatar
Lappro
Level 1
Level 1
Posts: 4
Joined: Thu Jan 10, 2019 11:01 am

Re: When updating kernel suggest cleaning up old ones if /boot is running low on space

Post by Lappro »

t42 wrote: Thu Apr 15, 2021 6:28 am
Moem wrote: Thu Apr 15, 2021 6:02 am How will a newcomer ever know that command, and know how to run it and when?
It's a valid argument. Still we should try to teach newcomers ...somehow.
Like showing a warning/hint when your /boot is almost out of space? :P
Post Reply

Return to “Suggestions & Feedback”