linuxmint / mintupdate

The Linux Mint Update Manager
320 stars 156 forks source link

Update Manager Kernel removal automation don't remove HWE kernels #717

Open ttjimera opened 2 years ago

ttjimera commented 2 years ago

Describe the bug I updated to 5.13 kernel via the Update Manger in order to get support for a new hardware. But I found that Update Manager obsolete kernel removal automation does not remove old 5.13 kernels. I have three 5.13 kernels now, 1 active and 2 installed. The 5.4 kernels removal continue to be automated correctly. I am wondering if Update Manager is design to only automatically remove the mainline kernel, leaving the HWE kernels' maintenance to the user's discretion? Or is this a bug?

I have LM only on my laptop. No other machine to test and reproduce this on.

Expected behavior The obsolete 5.13 series (HWE) kernels automatically removed by Update Manager if automation set on.

Distribution: Linux Mint 20.2 and now 20.3

Software version: Update Manager 5.8.1

Logs: 01.18@09:05 ++ Launching Update Manager 01.18@09:05 ++ Changes to the package cache detected, triggering refresh 01.18@09:05 ++ Starting refresh (local only) 01.18@09:05 ++ Initial refresh will happen in 0 day(s), 0 hour(s) and 10 minute(s) 01.18@09:05 ++ System is up to date 01.18@09:05 ++ Refresh finished 01.18@09:12 ++ Starting refresh (local only) 01.18@09:12 ++ System is up to date 01.18@09:12 ++ Refresh finished

smurphos commented 2 years ago

Not a bug - automatic removal with never remove a kernel you've manually installed, only old kernels that were installed as updates (i.e dependencies of the kernel meta package) - this is feature of the underlying package management system and applies in general to packages across the board - see the autoremove entry in 'man apt'. This is noted on the dialog in Update Manager where you can switch on automatic maintenance.

What could be a potential improvement to update manager is if on selecting a kernel from the current HWE, if the relevant meta package isn't present to install that rather than the kernel selected. That way the kernel itself (which would still install as a dependency of the metapackage) would be flagged as automatically installed and a candidate for autoremoval. Or revamp the kernel window to provide a selection of preferred kernel series - LTS, HWE, or HWE-Edge, and leave manually installed kernels as manually installed.

ttjimera commented 2 years ago

After removing all the mainline 3.4 kernels, now the old 5.13 kernels are removed correctly.