Ubuntu – How to set up aptitude-curses so that it doesn’t automatically select *recommended* packages

aptitudepackage-management

When I select a package for installation using aptitude-curses, sometimes a huge list of extra packages appear selected under "Packages being automatically installed to satisfy dependencies". When I go through this list I see that some packages are there only because the one I was installing in the first place recommends it.

Is there a way that I can set up aptitude so that these packages are not marked for installation, but instead appear in some sort of list like the "Packages which are suggested by other packages" already do?

Best Answer

You can do this permanently or on a per aptitude invocation basis.

Permanent Method (config file)

  • Press Alt+F2, and run gksudo gedit /etc/apt/apt.conf (or your favorite editor)
  • Add the following lines to the file:

    APT::Install-Recommends "0";
    APT::Install-Suggests "0";
    

Per-invocation Method (command-line switch)

Simply invoke aptitude with the without-recommends switch, e.g.

  • sudo aptitude --without-recommends for the interactive version
  • or sudo aptitude install --without-recommends <packages> for cli use.

One-time installation of recommended packages when the permanent method is used

If you use the permanent method to disable installation normally, but with to use it once with aptitude, simply invoke it as in the per-invocation method, but with the --with-recommends switch.