Repository navigation
Description
Bug description
Obsolete kernel versions are not removed by LMDE 7's automatic kernel cleanup, despite automatic removal being enabled in Update Manager.
After investigating the weekly cleanup service, I found that it executes:
/usr/bin/apt-get autoremove --purge -y
However, all version-specific kernel image and header packages are marked as manually installed. As a result, APT does not consider them eligible for automatic removal.
Steps to reproduce
- Install LMDE 7
- Enable Automatic Maintenance.
- Update LMDE 7 through Update Manager over a course of weeks/months.
- Allow multiple kernel updates to accumulate.
- Check installed kernel package markings using:
apt-mark showmanual - Observe that version-specific kernel image and header packages are marked as manually installed.
- Check automatically installed packages using:
apt-mark showauto - Observe that no version-specific kernel image or header packages are listed.
- Allow the scheduled
mintupdate-automation-autoremoveservice to run.
Additional investigation
I previously encountered the same issue and manually marked older kernel packages as automatically installed using apt-mark auto.
This temporarily restored the expected cleanup behaviour:
- August 8: I marked the older
6.12.100and6.12.96kernel packages as automatic. The next autoremove successfully removed kernel6.12.96. - August 26: After installing kernel
6.12.105, I found that newly installed kernel packages were marked as manual again. The next autoremove removed kernel6.12.100as expected. - November 2: Automatic cleanup has ran several times since August, but no kernels were removed while new ones were still being installed.
This suggests that subsequent kernel updates are causing previously corrected package markings to revert to manual.
Current system state
- LMDE 7
- Debian kernel series 6.12
- Six installed kernel versions, from
6.12.101through6.12.115 - All version-specific kernel image and header packages are marked as manually installed.
apt-mark showautoreturns no version-specific kernel image or header packages.
The November 2. automatic cleanup log contains:
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Expected behaviour
Automatic kernel cleanup should remove obsolete kernel versions while retaining the currently running kernel and an appropriate fallback version.
Kernel updates should not cause obsolete kernel packages to become permanently ineligible for automatic removal.
Actual behaviour
Version-specific kernel packages are marked as manually installed, preventing APT's autoremove from removing them. The weekly Mint cleanup therefore runs successfully but removes no obsolete kernels.
The issue reappears after subsequent kernel updates, even after manually correcting the package markings.
Impact
Obsolete kernels accumulate over time and consume /boot space. On installations with a relatively small /boot partition, this eventually prevents further kernel updates due to insufficient free space. Like I have experienced several times now.
Activity
[-][LMDE 7] Automatic kernel cleanup fails because installed kernel packages are marked as manually installed[/-][+]LMDE 7 - Automatic kernel cleanup fails because installed kernel packages are marked as manually installed[/+]VA1DER commentedon Nov 13, 2026
This is a very long-standing issue affecting all versions of Mint and should have the LMDE tag removed.
L1512191 commentedon Nov 13, 2026
Shocking if true.
Is anyone on the dev team working on this @clefebvre ?
mpumford commentedon Nov 18, 2026
Seeing exactly the same thing in 2 LMDE 7 VM's here. I have discovered that if you do the kernel updates with the CLI apt package tools all works as it should.
L1512191 commentedon Nov 24, 2026
Holy smokes, you're right.
I can confirm that updating the kernel via
sudo apt update && sudo apt upgradeworks as it should, and only the MintUpdate app makes the mistake of marking kernels as manual.[-]LMDE 7 - Automatic kernel cleanup fails because installed kernel packages are marked as manually installed[/-][+]Automatic kernel cleanup fails because installed kernel packages are marked as manually installed[/+][-]Automatic kernel cleanup fails because installed kernel packages are marked as manually installed[/-][+]LMDE7 - Automatic kernel cleanup fails because installed kernel packages are marked as manually installed[/+]L1512191 commentedon Nov 29, 2026
I did som more digging, and see that the kernel updates are moving to mintsysadm ref. #1081 according to @mtwebster. But I have no idea if it only applies to the regular Mint or if it also covers LMDE.
Then there is the timeframe question. In #938 @clefebvre said "This was moved to mintsysadm". So it sounds like it should be fixed in regular Mint already? But @VA1DER seems to disagree.
And what is the timeframe for a fix for LMDE?
I'm left with more questions than answers. But I hope that someone can enlighten me, because this issue is ruining an awsome distro.
mtwebster commentedon Nov 29, 2026
This is moved to mintsysadm for the upcoming Mint 27 release, along with general improvements to kernel management.
I don't think we've decided yet whether to enable kernel management for LMDE7, but either way the fix for packages always being marked manually-installed (aptkit) should make its way there along with other major updates once Mint 27 is released.