Web lists-archives.com

Re: Too many Recommends (in particular on mail-transport-agent)




Am 2017-06-08 16:07, schrieb Johannes Schauer:
Quoting Christian Seiler (2017-06-07 15:26:35)
  - You install package A, which Recommends: B, but you don't
    want B, notice that at the time, and either remove B
    afterwards, or install A with --no-install-recommends. But
    then you install package C at a later point in time, which
    actually depends on B. You notice that C is not what you
    wanted, purge it again, but apt-get autoremove will _not_
    remove B, even though it's automatically installed, because
    A recommends it.

    So basically, the following command sequence may or may not
    leave your system in an identical state, depending on the
    packages that previously have been installed on your system:

       apt-get install A
       apt-get purge A
       apt-get autoremove --purge

    Unfortunately, I don't see a good solution to this problem,
    and I've thought about this a lot in the past.

You may want to have a look at the following apt configuration setting:

APT::AutoRemove::RecommendsImportant "false";

It controls whether "autoremove" also considers autoremoving packages that are
only pulled in because of a Recommends relationship.

Well, that doesn't really help in this case.

In my scenario, I do have Recommends installed by default, I just
may decide to not install some Recommends in some cases. In that
case, apt-get autoremove with the setting you suggested would
remove a _ton_ of packages I actually want to keep. Your setting
is only useful if you also disable installing Recommends by default.
In that case, yes, it would help.

Regards,
Christian