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.

I use Ubuntu 12.04 64-bit, I did the following, sudo gedit /etc/apt/apt.conf and added

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

but did not work. When I try to install a package, it still wants to install the packages suggested and recommended. How I can solve this?

share|improve this question
    
See this related question: askubuntu.com/questions/196059/… –  user76204 Oct 24 '12 at 11:10
add comment

4 Answers 4

up vote 20 down vote accepted

If you do not want to install recomended packages you can run apt-get with the --no-install-recommends flag or aptitude with the --without-recommends/-R flag.


If you want these flags to always be enabled (I do NOT recommend this) put the following lines in your /etc/apt/apt.conf file:

APT::Get::Install-Recommends "false";
APT::Get::Install-Suggests "false";

Remember that these packages are recommended for a reason and it is probably not a good idea to ignore it at all times. You would be better off using the flags in the cases where you know that the recommended packages are wrong.

share|improve this answer
    
This will work, i can confirm that. –  Thomas W. Aug 22 '12 at 17:46
    
I have already tried that option but I'm trying to install from a ppa and not work, if it has worked installing from ubuntu reposoritorio. –  user84911 Aug 22 '12 at 20:47
    
I want to configure apt-get to always, do not install the packages suggested and recommended, so I want to set the file apt.conf sorry for my bad english –  user84911 Aug 22 '12 at 20:48
    
Edited post to show what apt.conf should have. –  Alex L. Aug 22 '12 at 21:46
    
thanks its works –  user84911 Aug 23 '12 at 14:31
add comment

You might be like me and have an /etc/apt/apt.conf.d/99synaptic file lurking around. I'm still not entirely sure where this file came from but it contains one line:

APT::Install-Recommends "true";

That would certainly have overridden a change in /etc/apt/apt.conf. I can't see that the file is used by any package any longer so I would suggest just deleting it (check the contents are similar) or swapping true for false.

share|improve this answer
add comment

The correct syntax in recent versions appears to be:

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

You can put this in /etc/apt/apt.conf (which no longer exists by default) or in a file such as 99local in /etc/apt/apt/conf.d.

Watch out for other files in /etc/apt/apt/conf.d which may override your settings.

share|improve this answer
add comment

I would recommend creating /etc/apt/apt.conf.d/60user file with the single line:

APT::Install-Recommends "false";

This works fine for me on 12.04.

share|improve this answer
2  
OP already stated that this did not work. –  Oli Oct 24 '12 at 10:24
    
I checked this on 10.04, 12.04, 14.04 and APT::GET::* dont work, buy APT::Install-* did work well with "apt-get install" –  ggrandes Jul 11 at 9:19
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.