Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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?

share|improve this question
add comment

2 Answers 2

up vote 2 down vote accepted

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.

share|improve this answer
    
I am ashamed to admit that the per invocation method suits me better. Ashamed because it was in the manpage :). I really appreciate the permanent method, though, I'll see if most of the time I use it without recommends and might just set it permanently if that is the case. –  Jacobo de Vera May 17 '12 at 10:28
add comment

Try: access the menu, ctrl+t, and navigate to the 'options' then 'preferences' then scroll down to the 'Dependency handling' section, and deselect 'install recommended packages automatically'.

share|improve this answer
    
Thank you, I guess this under the hood modifies the apt.conf file. I wish I could accept two answers, I'm accepting @izx 's one because it is more comprehensive. –  Jacobo de Vera May 17 '12 at 10:29
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.