Package: apt Version: 3.1.5 Severity: normal Dear Maintainer,
mmdebstrap uses apt to solve which packages to install. Use mmdebstrap to create a minimal chroot for illustration: # SOURCE_DATE_EPOCH=0 mmdebstrap --variant=essential --include=apt trixie /chroot-mmdebstrap-essential-apt http://deb.debian.org/debian Chroot into that chroot: # chroot /chroot-mmdebstrap-essential-apt Run apt to update list of packages: # apt update List packages with Priority: optional that are marked as manually installed: # apt list --installed '?priority(optional)' | grep -v 'automatic]' Creates this list: gcc-14-base/stable,now 14.2.0-19 amd64 [installed] libacl1/stable,now 2.3.2-2+b1 amd64 [installed] libattr1/stable,now 1:2.5.2-3 amd64 [installed] libaudit-common/stable,now 1:4.0.2-2 all [installed] libaudit1/stable,now 1:4.0.2-2+b2 amd64 [installed] libblkid1/stable,now 2.41-5 amd64 [installed] libbz2-1.0/stable,now 1.0.8-6 amd64 [installed] libc6/stable,now 2.41-12 amd64 [installed] libcap-ng0/stable,now 0.8.5-4+b1 amd64 [installed] libcap2/stable,now 1:2.75-10+b1 amd64 [installed] libcrypt1/stable,now 1:4.4.38-1 amd64 [installed] libdb5.3t64/stable,now 5.3.28+dfsg2-9 amd64 [installed] libdebconfclient0/stable,now 0.280 amd64 [installed] libgcc-s1/stable,now 14.2.0-19 amd64 [installed] libgmp10/stable,now 2:6.3.0+dfsg-3 amd64 [installed] liblastlog2-2/stable,now 2.41-5 amd64 [installed] liblzma5/stable,now 5.8.1-1 amd64 [installed] libmd0/stable,now 1.1.0-2+b1 amd64 [installed] libmount1/stable,now 2.41-5 amd64 [installed] libpam0g/stable,now 1.7.0-5 amd64 [installed] libpcre2-8-0/stable,now 10.46-1~deb13u1 amd64 [installed] libselinux1/stable,now 3.8.1-1 amd64 [installed] libsmartcols1/stable,now 2.41-5 amd64 [installed] libsqlite3-0/stable,now 3.46.1-7 amd64 [installed] libssl3t64/stable,now 3.5.1-1 amd64 [installed] libsystemd0/stable,now 257.8-1~deb13u1 amd64 [installed] libtinfo6/stable,now 6.5+20250216-2 amd64 [installed] libudev1/stable,now 257.8-1~deb13u1 amd64 [installed] libuuid1/stable,now 2.41-5 amd64 [installed] libzstd1/stable,now 1.5.7+dfsg-1 amd64 [installed] openssl-provider-legacy/stable,now 3.5.1-1 amd64 [installed] zlib1g/stable,now 1:1.3.dfsg+really1.3.1-1+b1 amd64 [installed] The list of such packages becomes even larger if mmdebstrap is used to install larger variants than just the essential. These packages are not essential/required/important/standard, they are pulled in as a dependency of packages with such priorities, and yet they are marked as manually installed, as if the user specifically requested to install these libraries. The issue is that these packages can never be automatically marked for removal due to being marked as manually installed, and so if a package in the essential/required/important/standard sets changes dependencies to no longer depend on one of these library packages, it will remain on the system forever. As a crude experiment, if I use `apt-mark auto` to mark all those packages as automatically installed, apt does not propose to automatically remove any of them afterwards.