apt now installs recommends by default

Michael Vogt michael.vogt at ubuntu.com
Tue Jun 10 18:47:26 BST 2008


Hi,

with the last apt upload to intrepid I changed the default policy of
apt to install recommends by default (packages listed in the
"Recommends" field in debian/control). We follow debian here who
changed this default back in October.

It was a long standing issue in apt that it does not honor recommends
properly. The policy says about recommends:

Recommends
    This declares a strong, but not absolute, dependency.
    The Recommends field should list packages that would be found
    together with this one in all but unusual installations.

Because apt ignored recommends for such a long time there are probably
still bogus recommends that need to be cleaned up and removed or
downgraded to suggests.

Apt will install recommends by default for new packages as if those
were depends.  But it will not complain about unsatisfied recommends
on your system and will make no attempt to install them if they are
missing. 

To turn this feature off, pass --no-install-recommends to apt or set,
in your apt configuration, APT::Install-Recommends=False.

Because it only affects new package installs on your currently
installed packages nothing changes. If you want to see what would
change if you had a system with --install-recommends please run:

# apt-get install --fix-policy --install-recommends

This will make apt try to install all packages that are recommended by
the installed packages.  

If you want to know what package causes the installation of what
recommends please run:

# apt-get install --fix-policy --install-recommends -o Debug::pkgDepCache::AutoInstall=true

It is also possible to see what packages got installed because they
were pulled in as recommends of other package. This makes use of the
automatic install information. With the current apt you can run:

# apt-get autoremove -o APT::AutoRemove::RecommendsImportant=false

This information is currently not accessable in synpatic, but I plan
to add a filter for it so that its easily accessable what packages got
auto-installed as recommends.

For areas were this change is problematic I would recommend to run
apt-get with --no-install-recomments (e.g. the ubuntu-vm-builder).

We should also clean up recommends were appropriate and downgrade them
to suggests and sent the patches debian.

Cheers,
 Michael



More information about the ubuntu-devel mailing list