Stack Exchange Network
Stack Exchange network consists of 181 Q&A communities including
Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
Visit Stack Exchange
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It only takes a minute to sign up.
Sign up to join this community
Anybody can ask a question
The best answers are voted up and rise to the top
10 years, 9 months ago
I use Ubuntu 12.04 64-bit, I did the following:
sudo gedit /etc/apt/apt.conf and added
But it did not work. When I try to install a package, it still wants to install the suggested and recommended packages. How can I solve this?
Aug 22, 2012 at 16:08
1,031 1 1 gold badge 8 8 silver badges 7 7 bronze badges
If you do not want to install recomended packages you can run
apt-get with the
--no-install-recommends flag or
aptitude with the
If you want these flags to always be enabled (I do NOT recommend this) put the following lines in your
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.
Aug 22, 2012 at 17:33
Alex L. Alex L.
3,278 1 1 gold badge 17 17 silver badges 21 21 bronze badges
According to me, changing conf files are too risky and unnecessary. Rather
apt-get provides options to specify do not install recommended packages.
sudo apt-get install --no-install-recommends package-name
This is better than changing conf file.
d a i s y
5,391 9 9 gold badges 40 40 silver badges 59 59 bronze badges
Apr 28, 2017 at 4:56
The correct syntax in recent versions appears to be:
You can put this in
/etc/apt/apt.conf (which no longer exists by default) or in a file such as
Watch out for any other files in
/etc/apt/apt.conf.d which may override your settings.
11k 8 8 gold badges 50 50 silver badges 76 76 bronze badges
Jun 25, 2013 at 16:49
Checked today (07 Jan 2015).
These settings work well for me:
This solution does not work:
Jan 7, 2015 at 17:57
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:
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.
Oct 24, 2012 at 10:27
Oli ♦ Oli
288k 117 117 gold badges 677 677 silver badges 832 832 bronze badges
You can specify configuration strings from the command line, using the
This works for me (APT v.1.4.8) (
sudo as needed):
apt-get install package1 package2 -o APT::Install-Suggests=0 -o APT::Install-Recommends=0
Jan 27, 2018 at 20:36
1,880 1 1 gold badge 15 15 silver badges 12 12 bronze badges
Use the following command to add it to
apt-config dump | grep -we Recommends -e Suggests | sed s/1/0/ | sudo tee /etc/apt/apt.conf.d/99norecommend
Check the current settings by:
apt-config dump | grep -we Recommends -e Suggests
Can I make apt-get always use --no-install-recommends?
May 8, 2019 at 11:11
9,846 2 2 gold badges 76 76 silver badges 90 90 bronze badges
I would recommend creating /etc/apt/apt.conf.d/60user file with the single line:
This works fine for me on 12.04.
Oct 21, 2012 at 17:07
27 1 1 bronze badge
By clicking “Accept all cookies”, you agree Stack Exchange can store cookies on your device and disclose information in accordance with our
Accept all cookies
Necessary cookies only
apt-config dump |fgrep -i recommendwill suggest current fashion syntax in case it changes again.
apt-mark hold package-that-apt-should-leave-alone. hold hold is used to mark a package as held back, which will prevent the package from being automatically installed, upgraded or removed.