[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: debfoster and apt



On Thu, Nov 21, 2024 at 09:22:11AM +0100, Marc Haber wrote:
> How would I used apt to iterate over the set of packages that nothing
> depends on and give the user the choice to deinstall those packages?
>
> debfoster goes a step further and offers an additional "deinstall this
> and all dependencies that nothing else depends on" choice.

apt autoremove automatically removes all automatically installed
packages. Surely you must have seen its prompt in dist-upgrade
telling you about which packages are autoremovable?

The debfoster package description basically says it's doing the
same thing.

The classic autoremove code is conservative: It keeps all Depends,
Recommends, and Suggests that are reachable from a manually
installed package.

apt autoremove --solver 3.0 is normalizing: Given a set of manually
installed packages, the set of automatically installed packages will
always be the same. Hence if you have

- AUTOMATIC a, b, q, r, s, t
- MANUAL    m, Depends: a | b, Recommends: q|r, Suggests: s|t

Then

- classic solver keeps    a, b, q, r, s, t
- --solver 3.0   keeps    a, q, s

It's worth noting that (AFAIUI) Recommends and Suggests that are currently
satisfied in an installed version of a package are promoted to Depends,
such that for example:

    m=1 suggests s (= 1)

Then dist-upgrade would refuse to install s = 2 because it breaks the
Suggests from m.

This promotion of Suggests is a bit controversial, but basically
the argument is that: If a Suggests got installed *somehow*, you could
have come to rely on the additional functionality it provides to the
package that Suggests it and removing it now would break your work
flow.

In Ubuntu, we remove packages only kept around by Suggests when
upgrading between releases as you are used to higher breakage
when upgrading releases. In Debian, we don't have a release
upgrade tool, and a lot of people are running unstable or testing
and hence would not benefit from that choice regardless.
-- 
debian developer - deb.li/jak | jak-linux.org - free software dev
ubuntu core developer                              i speak de, en

Attachment: signature.asc
Description: PGP signature


Reply to: