Bug 430296 - Kernel updates marked as manual
Summary: Kernel updates marked as manual
Status: RESOLVED UPSTREAM
Alias: None
Product: Discover
Classification: Applications
Component: discover (show other bugs)
Version: 5.18.5
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Dan Leinir Turthra Jensen
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-12-12 12:31 UTC by Holger
Modified: 2021-01-29 09:51 UTC (History)
5 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Holger 2020-12-12 12:31:17 UTC
SUMMARY
On installing kernel updates, plasma-discover marks them as manual, thereby preventing "apt autoremove" from discarding old ones and clogging up /boot, that outside of the discencryption is usually a tiny partition, holding only very few kernels at a time.

STEPS TO REPRODUCE
1. apply kernel update in plasma-discover
2. apt-mark showmanual 'linux-.*'

OBSERVED RESULT
multiple linux-* packages are marked manual.

EXPECTED RESULT
no additional linux-+ packages shall be marked manual, so "apt autoremove" can pick them up later.

SOFTWARE/OS VERSIONS
Operating System: Kubuntu 20.04
KDE Plasma Version: 5.18.5
KDE Frameworks Version: 5.68.0
Qt Version: 5.12.8
Kernel Version: 5.4.0-56-generic
OS Type: 64-bit
Processors: 8 × Intel® Core™ i7-4700MQ CPU @ 2.40GHz
Memory: 15,6 GiB

ADDITIONAL INFORMATION
also reported to:
https://bugs.launchpad.net/ubuntu/+source/unattended-upgrades/+bug/1675079/comments/37
Comment 1 Nate Graham 2020-12-17 05:13:38 UTC
Sorry, I'm not very knowledgeable about packaging so could you clarify what you mean by "plasma-discover marks them as manual"? What does this mean? On my Neon machine, I can update Kernels using Discover and remove old ones using apt autoremove.
Comment 2 Holger 2020-12-20 22:12:08 UTC
The apt-mark commandline shows:
$ apt-mark showmanual 'linux-.*'
linux-base
linux-generic
linux-headers-5.4.0-58
linux-headers-5.4.0-58-generic
linux-image-5.4.0-58-generic
linux-libc-dev
linux-modules-5.4.0-58-generic
linux-modules-extra-5.4.0-58-generic
linux-sound-base
syslinux-common
syslinux-legacy

I can "unmarked" manually e.g. the previous kernel with this command:
$ apt-mark auto 'linux-*-5.4.0-56*'

and list them:
$ apt-mark showauto 'linux-.*'
binutils-x86-64-linux-gnu
liblinux-epoll-perl
linux-firmware
linux-headers-5.4.0-56
linux-headers-5.4.0-56-generic
linux-headers-generic
linux-image-5.4.0-56-generic
linux-image-generic
linux-modules-5.4.0-56-generic
linux-modules-extra-5.4.0-56-generic

Now running:
$ apt autoremove

Will be able to clean them up.

This bug is about every new kernel installed via the GUI-Update notifier of KDE/Plasma, will become marked manual again and thereby prohibited from being picked for apt autoremove. The tiny /boot partition fills up quickly and with the 4-th or 5-th kernel, updates through the GUI fail with random strange messages not giving hints to the space problem.
Comment 3 Holger 2021-01-14 16:31:48 UTC
installed another update via commandline:
sudo apt update
sudo apt upgrade
apt-mark showmanual 'linux-.*'
linux-base
linux-generic

So the issue of this bug did not happen by "apt" alone ... But also some more packages were meanwhile removed from manual status (compared to the 11 entries in comment 2), not by apt but by me before running apt. Now I wait for the next kernel update to run via Discover again.
Comment 4 Aleix Pol 2021-01-14 17:27:19 UTC
Hi,
This is something that I assume apt implementation in PackageKit might be doing, so I'd recommend reporting here: https://github.com/hughsie/PackageKit/issues

That said, I just checked my kubuntu machine and I had all my old kernels to be autoremoved. You could also consider reporting to the Kubuntu team who might have a better insight than I do of apt internals.
Comment 5 Holger 2021-01-20 20:10:06 UTC
to document it here:

Before and after applying the latest kernel-updates:

root@Meerschweinchen:/home/holger# apt-mark showmanual 'linux-.*'
linux-base
linux-generic
root@Meerschweinchen:/home/holger# apt-mark showmanual 'linux-.*'
linux-base
linux-generic
linux-headers-5.4.0-64
linux-headers-5.4.0-64-generic
linux-image-5.4.0-64-generic
linux-modules-5.4.0-64-generic
linux-modules-extra-5.4.0-64-generic
root@Meerschweinchen:/home/holger#
Comment 6 Holger 2021-01-20 20:49:28 UTC
reported to https://github.com/hughsie/PackageKit/issues/450
Comment 7 Mauro Molinari 2021-01-29 09:51:37 UTC
I'm also seeing this problem in Kubuntu 20.04. Kernel updates installed through the Discover UI (through "update all packages") are marked as manually installed and hence they are not manually purged by unattended-upgrades/apt autoremove as documented at: https://help.ubuntu.com/community/RemoveOldKernels
I'll monitor the upstream bug report...