54

I ran the following code and got this package needs these packages, now it also says these packages are suggested, and theses are recommended. How do I get those up to install as well.

myusuf3@purple:/etc$ sudo apt-get install virtualbox-4.0 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following extra packages will be installed:
  acroread ia32-libs lib32asound2 lib32bz2-1.0 lib32gcc1 lib32ncurses5 lib32stdc++6 lib32v4l-0 lib32z1 libaudio2
  libc6-i386 libcurl3 libflac8 libhal1 liblcms1 libmng1 libogg0 libpulse0 libqt4-dbus libqt4-network libqt4-opengl
  libqt4-xml libqtcore4 libqtgui4 libsdl-ttf2.0-0 libsdl1.2debian libsdl1.2debian-alsa libsndfile1 libv4l-0
  libvorbis0a libvorbisenc2 libx11-xcb1 nspluginwrapper
Suggested packages:
  libldap2 libgnome-speech7 lib32asound2-plugins nas liblcms-utils pulseaudio qt4-qtconfig
Recommended packages:
  pdf-viewer
The following NEW packages will be installed:
  acroread ia32-libs lib32asound2 lib32bz2-1.0 lib32gcc1 lib32ncurses5 lib32stdc++6 lib32v4l-0 lib32z1 libaudio2
  libc6-i386 libcurl3 libflac8 libhal1 liblcms1 libmng1 libogg0 libpulse0 libqt4-dbus libqt4-network libqt4-opengl
  libqt4-xml libqtcore4 libqtgui4 libsdl-ttf2.0-0 libsdl1.2debian libsdl1.2debian-alsa libsndfile1 libv4l-0
  libvorbis0a libvorbisenc2 libx11-xcb1 nspluginwrapper virtualbox-4.0
0 upgraded, 34 newly installed, 0 to remove and 26 not upgraded.
Need to get 168MB of archives.
After this operation, 460MB of additional disk space will be used.

Please and thank you

3 Answers 3

53

Recommends are installed by default (since Lucid). To negate this for a specific package, use apt-get --no-install-recommends install pkg. Suggests, however, are not. You can install the suggests for a single package installation by using apt-get -o APT::Install-Suggests="true" install pkg.

Installing conky without Suggests:

laney@iota> sudo apt-get install conky
[...]
Suggested packages:
  apcupsd moc mpd
The following NEW packages will be installed
  conky conky-all

…or with Suggests:

laney@iota> sudo apt-get -o APT::Install-Suggests="true" install conky
[...]
The following NEW packages will be installed
  apache2 apache2-doc apache2-mpm-worker apache2-suexec apache2-utils apache2.2-bin apache2.2-common apcupsd apcupsd-cgi apcupsd-doc ario ario-common conky
  conky-all icecast2 ices2 libao-common libao4 libaprutil1-dbd-sqlite3 libaprutil1-ldap libcue1 libmpdclient2 libresid-builder0c2a libsidplay2 libsidutils0
  moc moc-ffmpeg-plugin mpd

You can make this the default behaviour by putting

APT::Install-Suggests "true"

in a file in /etc/apt/apt.conf.d/, for example /etc/apt/apt.conf.d/30install-suggests.

2
  • 10
    Can also install suggested packages with the --install-suggests option. E.g. sudo apt install --install-suggests conky
    – Dennis
    Nov 28, 2016 at 15:39
  • If recommended packages are installed by default, then why is pdf-viewer not listed under the packages to be installed, in the example?
    – wensveen
    Jan 3, 2022 at 13:21
45

For the suggested packages, you can simply use the --install-suggests flag:

Consider suggested packages as a dependency for installing.
Configuration Item: APT::Install-Suggests.

instead of passing the option -o APT::Install-Suggests="true"
[ just like you have --install-recommends ]

Example:

sudo apt-get --install-suggests install mercurial
7
  • Interesting solution... but --install-suggests is not available for Maverick. When was this feature added to apt-get?
    – MestreLion
    Jan 25, 2012 at 3:45
  • 7
    Isn't that command recursive? So you will also install the suggested packages of all the suggested packages and so on and so on. Ive seen 3rd party examples where an initial install of a few MB has become more than 1GB of installs due to the recursion this route can throw up. Apr 17, 2015 at 8:39
  • 1
    @PhillHealey You're right, it's a big issue >.>
    – retrixe
    Dec 2, 2016 at 15:19
  • @PhillHealey That's why we have the confirmation before actual installation… Jan 16, 2017 at 4:14
  • 3
    @PhillHealey Yes, that's where I would avoid use --install-suggests, so it's only fine in interactive installation. (And I really wonders why would anyone require all the suggested software in automated scripts… As far as I understand, suggested software is like "Customers Who Bought This Item Also Bought"; I have to be really rich to require a "buy all" functionality without even looking at the list.) Jan 16, 2017 at 17:51
14

Add the option --install-recommends to your command:

sudo apt-get --install-recommends install virtualbox-4.0 
2
  • When you use --install-suggests make sure you examine the list of programs that will be installed - sometimes you get quite a list of programs that are put onto your system (try --install-suggests with TuxGuitar) Oct 26, 2014 at 22:40
  • 3
    Isn't that command recursive? So you will also install the suggested packages of all the suggested packages and so on and so on. Ive seen 3rd party examples where an initial install of a few MB has become more than 1GB of installs due to the recursion this route can throw up. Apr 17, 2015 at 8:40

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .