Bug#1086801: apt: autoremove fails to remove garbage packages with unrelated Suggests links
Stephen Kitt <[email protected]> Sat, 18 Apr 2026 17:07:46 +0200
| Newsgroups | gmane.linux.debian.apt.devel |
|---|---|
| Message-ID | <yj4bwdvrayazq4daw7jub54tejez4er6gjpgiuyhnssfckgzw5__885.774106585302$1776524965$gmane$org@ohjon5e2xlgl> |
--rs3k4nvjkb5haqnc Content-Type: text/plain; protected-headers=v1; charset=utf-8; format=flowed Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Subject: Re: Bug#1086801: apt: autoremove fails to remove garbage packages with unrelated Suggests links MIME-Version: 1.0 On Wed, Nov 06, 2024 at 10:07:54AM +0100, David Kalnischkies wrote: >Am Wed, Nov 06, 2024 at 01:59:59AM -0600, schrieb Aaron Rainbolt: >> 4. Install the package with `sudo apt install ./test-meta_1.0_all.deb`. >> 5. Purge the package with `sudo apt purge test-meta`. >> 6. Run `sudo apt autopurge`. >> >> Expected result: `gitk` should be removed during the autopurge step. >> >> Actual result: Only the test-meta package is removed. > >That might be expected if there are mere seconds between step 4 and 5 as >the user has realistically only interacted with test-meta in that time >frame. The longer the time is between these two steps through it becomes >possible that the user discovered gitk and fell in love with it. > >autoremoving it would be very wrong then (and gitk is a really bad >example here as you interact with it directly; many recommends "just" >enable features within the package that recommended them). I agree that autoremoving gitk in step 6 would be wrong. However, what about `sudo apt purge --autoremove test-meta`? As I understand it, that currently has the same effect as `sudo apt purge gitk` followed by a separate `autoremove`; but would it be possible for the `--autoremove` flag to instead mean =E2=80=9Cauto-remove packages t= hat are made autoremovable as a result of removing test-meta=E2=80=9D? In effec= t, something like =E2=80=9Cdetermine the list of currently auto-removable packages=E2=80=9D, =E2=80=9Cremove test-meta=E2=80=9D, =E2=80=9Cremove any = packages that are now auto-removable but weren=E2=80=99t before the test-meta removal=E2=80=9D. With that change, setting SuggestsImportant to false temporarily would allow the example installation to be reversed. Regards, Stephen --rs3k4nvjkb5haqnc Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEnPVX/hPLkMoq7x0ggNMC9Yhtg5wFAmnjnj0ACgkQgNMC9Yht g5w6bxAAmGmS7EpeeQ7VnZ457h34qwldzeUu400vUMGQ21J8+PD1D4lRorIFcDkf snccPUeql7gciLv+5O/Ojx+Cm8wNvRCkRFK6tVyOtmDmRrn7IJ1u8y6ZD41Cwo0Z Xo28bgPqcuWxaZafQycY7TVRURuZoJo0jKdsN7xADD3OEfg1za2ODLbHYd2bLtSB yIVZwS9FRczGgjVYpaoctwUd1UXN2Pm2oy34VRa4QRsxyLtam2nWUBvpu+1DZGYP aJx+Tusg3a6IFV5xRcMIMrtJTOzO/Oc37lb5TTfDw/bVIjX3zFFDzVg80e3rCiiu MkFlboJMCtXwetFechmWOO0vZqoJdHh0joGC3f50eUNDEKn6AWx2hJhDxYPd1PfZ K14oBH3KEM98y0jI9AvGY96B2B04xuFQsX7GpHWtD70drb7uXnCR5y65SqFm0ufl Pc7u8YEMOo266Ycwt6xwo1JENb9ALlvuoFlYNVMRIlIjlLihMCWMX8QnhKbVby0K BXtBDgDhs30wFROSh0S6Oy+z4n1rDHqY++JAwk3dk8sTofG5dw2dtjKRGlcBlL+f RPTH9v7dxQtlOhxCR0zd1yYt0i1ULmrspx3nhmm3lxEkG9kxqlyIQuJcX2kg9/4M I8w3dY24ZajoxKtrnmuuhLdeG9BB1bjdHQHS68h9frl7oQGvkQ8= =ERkp -----END PGP SIGNATURE----- --rs3k4nvjkb5haqnc--