You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Automatic kernel removal does not appear to be working #938
Describe the bug
With automatic kernel removal enabled by going to Edit > Preferences > Automation and enabling "Remove obsolete kernels and dependencies" kernels older than the two most recent do not get removed.
Screenshots
If applicable, add screenshots to help explain your problem, you can just drag & drop them here.
To Reproduce
Steps to reproduce the behavior:
Go to 'Edit > Preferences > Automation'
Click on 'Remove obsolete kernels and dependencies'
Scroll down to '....'
See error
Expected behavior
After waiting a week, the old kernels should no longer be listed as installed in Update Manager, and the kernel files should be gone from /boot
Distribution:
Linux Mint
LMDE
Other (please specify)
Version 7.0.7 of mintUpdate
Logs:
Copy & paste the log output from Update Manager > View > Information here.
Crash report:
If you are reporting a crash, please run mintupdate from a terminal window, reproduce the crash and copy & paste any output from the terminal window here.
I have the same problem with Update Manager in Mint 22.1. Attached is a screenshot showing the number of old kernels still installed even though I've enabled the automatic removal feature in Update Manager's preferences
The autoremove service simply runs apt-get autoremove --purge periodically. So if the command doesn't remove obselete kernels, the automatic kernel removal can't work correctly. On my LM22.1 system, the command indeed doesn't remove them, so this may be the cause?
The autoremove service simply runs apt-get autoremove --purge periodically.
darkwing@MCP-Notebook ~ $ sudo apt-get autoremove --purge
Paketlisten werden gelesen… Fertig
Abhängigkeitsbaum wird aufgebaut… Fertig
Statusinformationen werden eingelesen… Fertig
0 aktualisiert, 0 neu installiert, 0 zu entfernen und 0 nicht aktualisiert.
No Errormessage, but also not removing old kernels
Same here, only discovered the problem when my boot partition was full preventing the installation of new kernels. Removed old kernels manually no problem via the update manager 'view' option.
Can also confirm this is happening on multiple of my LMDE 7 installs.
However, from what I gather, this appears like it might be an upstream bug either with Debian itself or in the Autoremove command, as I have seen the same behavior reported for both Ubuntu and Pure Debian. Can anyone find a discussion of this bug in any of the upstream projects?
This issue is caused by Update Manager (mintupdate) not marking kernel installations and upgrades for auto removal. Running the apt-mark command will show that all of your kernel packages are marked as 'manual' instead of 'automatic':
A workaround for this is to use the apt command line for kernel upgrades instead as this will properly mark the kernel for automatic removal:
apt update apt upgrade
After running apt update/upgrade, you can run autoremove manually or wait for Update Manager to run it if you have the 'Remove obsolete kernels and dependencies' enabled in preferences (Update Manager runs apt-get autoremove --purge -y).
To see what would be removed:
apt autoremove --dry-run
To remove:
apt autoremove
I have submitted PR #1081 to fix this issue. It was recently announced that the Linux Mint devs are moving kernel management from Update Manager to the System Administration tool for Linux Mint 23 so the problem should go away, but I don't know if they will be backporting this change to older versions so the fix may still be needed.
Activity
linuxminty commentedon Apr 6, 2025
I have the same problem with Update Manager in Mint 22.1. Attached is a screenshot showing the number of old kernels still installed even though I've enabled the automatic removal feature in Update Manager's preferences
Doc-Dish commentedon Apr 19, 2025
I have the same issue (starting with kernel version 6.8.0-52). Kernels are also not removed with
apt autoremove --purge.Elliot4444 commentedon Apr 22, 2025
Same issue with the 6.11 kernels on Linux Mint 22.1.
rjys365 commentedon May 24, 2025
The autoremove service simply runs
apt-get autoremove --purgeperiodically. So if the command doesn't remove obselete kernels, the automatic kernel removal can't work correctly. On my LM22.1 system, the command indeed doesn't remove them, so this may be the cause?MegaV0lt commentedon May 28, 2025
Same issue here. Old kernels don't get removed automaticly
MegaV0lt commentedon May 28, 2025
No Errormessage, but also not removing old kernels
Doc-Dish commentedon Jul 4, 2025
Following https://askubuntu.com/questions/1325387/why-is-apt-get-autoremove-failing-to-remove-my-old-kernels, I checked and all the
linux-*packages are marked as manually installed. The page suggests marking alllinux-*packages as manual, but this includeslinux-base,linux-firmware&linux-generic. Removing them seems like a bad idea to me.git-developer commentedon Oct 23, 2025
Linux Mint 22.2 is affected by this issue.
dak151 commentedon Nov 27, 2025
Just seen this on a few Linux Mint installs of my own (22.2 Cinnamon) -- any updates on this?
MegaV0lt commentedon Nov 27, 2025
Still not working (Cinnamon 22.2):
simpleclient.py: Add upgrade_packages.
Use SimpleAPTClient.upgrade_packages to preserve autoinstall states,
simpleclient.py: Use #auto tag on dependencies when
Use SimpleAPTClient.upgrade_packages to preserve autoinstall states,
Loufute commentedon Dec 15, 2025
Hi all. Same issue here this very morning again (more than 10 kernels kept).
Also discussed here : linuxmint/linuxmint#794
MegaV0lt commentedon Feb 7, 2026
Still not removed here in Mint Cinnamon 22.3
cancunia commentedon Mar 13, 2026
Same here, only discovered the problem when my boot partition was full preventing the installation of new kernels. Removed old kernels manually no problem via the update manager 'view' option.
JimmyS83 commentedon Apr 13, 2026
Confirming also for LMDE 7. It used to work, but not anymore (found that by accident, when /boot was completelly filled up)
Commander-Zal commentedon Jun 22, 2026
Can also confirm this is happening on multiple of my LMDE 7 installs.
However, from what I gather, this appears like it might be an upstream bug either with Debian itself or in the Autoremove command, as I have seen the same behavior reported for both Ubuntu and Pure Debian. Can anyone find a discussion of this bug in any of the upstream projects?
AlexB7 commentedon Aug 13, 2026
This issue is caused by Update Manager (mintupdate) not marking kernel installations and upgrades for auto removal. Running the apt-mark command will show that all of your kernel packages are marked as 'manual' instead of 'automatic':
apt-mark showmanual | grep -E '^linux-(image|headers|modules)' | sortRunning apt-mark showauto will likely return nothing:
apt-mark showauto | grep -E '^linux-(image|headers|modules)' | sortA workaround for this is to use the apt command line for kernel upgrades instead as this will properly mark the kernel for automatic removal:
apt updateapt upgradeAfter running apt update/upgrade, you can run autoremove manually or wait for Update Manager to run it if you have the 'Remove obsolete kernels and dependencies' enabled in preferences (Update Manager runs apt-get autoremove --purge -y).
To see what would be removed:
apt autoremove --dry-runTo remove:
apt autoremoveI have submitted PR #1081 to fix this issue. It was recently announced that the Linux Mint devs are moving kernel management from Update Manager to the System Administration tool for Linux Mint 23 so the problem should go away, but I don't know if they will be backporting this change to older versions so the fix may still be needed.
simpleclient.py: Use #auto tag on dependencies (#14)
clefebvre commentedon Aug 19, 2026
This was moved to mintsysadm and no longer relies on APT auto flags.
janxkoci commentedon Aug 26, 2026
@clefebvre will this be backported to LMDE7 or should we expect it working only in LMDE8?