This forum has been archived. All content is frozen. Please use KDE Discuss instead.

KDE neon does not fully remove old kernels

Tags: None
(comma "," separated)
Gibtnix
Registered Member
Posts
9
Karma
0
Hello everyone,

I noticed that KDE neon keeps taking more and more hard disc space over time. Using Filelight I noticed that there are remaining folders from old kernels in '/usr/lib/modules/X.X.X-XX-generic/', even though the respective old kernels were already removed using 'apt autoremove'. Clearly, I can manually delete the kernel packages using muon, still I would appreciate an automatic deleting when the corresponding kernel are removed. Is there an easy fix for this?

Thanks in advance!
User avatar
claydoh
Registered Member
Posts
1170
Karma
9
OS
This is probably an Ubuntu bug, since Neon does not touch anything kernel related. Both my Neon systems only have the modules folders for the two kernels present after using autoremove. The packages linux-modules-5.4.0-XX-generic are not being removed, or leaving the folders behind, and is not the expected behavior I believe.


claydoh, proud to be a member of KDE forums since 2008-Oct, and KDE user since 2001
Gibtnix
Registered Member
Posts
9
Karma
0
Alright and thanks for the fast response! So we can actually expect that this gets fixed by the ubuntu devs (sooner or later) or is it worth reporting a bug there? ???
User avatar
claydoh
Registered Member
Posts
1170
Karma
9
OS
Not sure. My kernels are being removed when i run autoremove, as expected. Worth reporting, though. I don't see any recent bug reports on this doing a very quick search


claydoh, proud to be a member of KDE forums since 2008-Oct, and KDE user since 2001
joninchaurbe
Registered Member
Posts
32
Karma
0
OS
Recently there was a similar thread.
Autoremove (sudo apt autoremove --purge) only removes kernels marked as automatically installed. And apparently, after an upgrade, the old kernels are considered as manuallý installed. Could this be considered as a bug? I don't know.
Anyway, the solution is to erase old kernels except newer two, the kernel in use and the penultimate kernel.
In future, the oldies will be automatically removed.
User avatar
minson
Registered Member
Posts
30
Karma
0
after some info from my post earlier about kernels not being removed automatically i created this script which runs on boot up . So far no negative side effects .

#!/bin/bash
apt-mark auto $(apt-mark showmanual | grep -E "^linux-([[:alpha:]]+-)+[[:digit:].]+-[^-]+(|-.+)$")
apt-get -y autoremove --purge
Gibtnix
Registered Member
Posts
9
Karma
0
Thanks everyone for the answers. I just reported a but at ubuntu: https://bugs.launchpad.net/ubuntu/+bug/1907887

Hoping this gets fixed soon... 8)


Bookmarks



Who is online

Registered users: Bing [Bot], Google [Bot], Yahoo [Bot]