84

I know the question has been asked before, but please hear me out. So I wanted to install screenlets. I ran sudo apt-get install screenlets, and this is what I got:

The following extra packages will be installed:
  libart-2.0-2 libbonobo2-0 libbonobo2-common libbonoboui2-0 libbonoboui2-common libgnome2-0 libgnomecanvas2-0
  libgnomecanvas2-common libgnomeui-0 libgnomeui-common libtidy-0.99-0 python-beautifulsoup python-evolution
  python-feedparser python-gmenu python-gnome2 python-numpy python-pyorbit python-rsvg python-tz python-utidylib
  screenlets-pack-basic
Suggested packages:
  libbonobo2-bin python-gnome2-doc python-numpy-doc python-numpy-dbg python-nose python-dev gfortran
  python-pyorbit-dbg screenlets-pack-all python-dcop
Recommended packages:
  python-numeric python-gnome2-extras
The following NEW packages will be installed:
  libart-2.0-2 libbonobo2-0 libbonobo2-common libbonoboui2-0 libbonoboui2-common libgnome2-0 libgnomecanvas2-0
  libgnomecanvas2-common libgnomeui-0 libgnomeui-common libtidy-0.99-0 python-beautifulsoup python-evolution
  python-feedparser python-gmenu python-gnome2 python-numpy python-pyorbit python-rsvg python-tz python-utidylib
  screenlets screenlets-pack-basic
0 upgraded, 23 newly installed, 0 to remove and 2 not upgraded.

People say that Recommended packages are installed by default, but they are clearly not included in the NEW packages that will be installed above. I also decided to include the Suggested packages in the installation, so I ran sudo apt-get --install-suggests install screenlets instead, but I got a HUGE list of NEW packages that will be installed; that number is precisely 0 upgraded, 944 newly installed, 0 to remove and 2 not upgraded. Should'nt I be getting only around 10 extra packages?

4
  • 3
    --install-suggests will be recursive, meaning that it will also calculate suggestions from all the packages suggested by screenlets. That's why you get so many. FWIW I also get like 700 packages to install if I use --install-suggests
    – roadmr
    Mar 31, 2012 at 14:40
  • 1
    Yeah, thanks for clarifying that. That was my initial thought, although I thought it would be ridiculous if it were true.
    – Alaa Ali
    Mar 31, 2012 at 15:56
  • 1
    Is there a way then to simply install thge suggested packages for the programme/package currently being installed? So, without the recursion? Apr 17, 2015 at 8:18
  • 1
    In case you used --no-install-recommends you can use apt-get -o apt::install-recommends=true to install those this time
    – rubo77
    Apr 23, 2015 at 5:08

3 Answers 3

95

suggests and recommends are not the same thing.

Package A depends on Package B if B absolutely must be installed in order to run A. In some cases, A depends not only on B, but on a version of B. In this case, the version dependency is usually a lower limit, in the sense that A depends on any version of B more recent than some specified version.

Package A recommends Package B, if the package maintainer judges that most users would not want A without also having the functionality provided by B.

Package A suggests Package B if B contains files that are related to (and usually enhance) the functionality of A.

See The Debian GNU/Linux FAQ for details.

By default, apt-get installs recommended packages.

Your option --install-suggests adds in the suggested packages and their suggested dependencies.

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

see apt-get(8).

10
  • 2
    Yes, I am aware that dependencies, recommended and suggested packages are not the same thing. However, you say recommended packages are installed by default, but from the extract I posted, the Recommended packages are not part of the "following NEW packages will be installed" list. Furthermore, I actually just installed screenlets and the Recommended packages were not installed =/.
    – Alaa Ali
    Mar 31, 2012 at 15:47
  • 4
    However, thanks for clarifying the --install-suggests part, although I think it's ridiculous that Ubuntu installs the suggested packages AND their suggested dependencies LOL...the required packages went from 6MB to over 1GB with the --install-suggests option.
    – Alaa Ali
    Mar 31, 2012 at 15:50
  • 1
    I found out why the recommended packages were not included in the packages to be installed. It's because the recommended packages do not exist in the repositories =/.
    – Alaa Ali
    Mar 31, 2012 at 17:14
  • 1
    @Alaa Ali - indeed, I tried to install wine and found that with --install-suggests it wound up trying to install emacs packages. Because we all know that there's no reason in running Windows programs if you're a vim user. A slippery slope encountered in the wild!
    – Ram
    Aug 15, 2015 at 19:00
  • 2
    @JamesHirschorn shout be sudo apt-get install --install-suggests <package>
    – Panther
    Jul 17, 2018 at 6:30
15

I found out why the recommended packages in my question were not included in the packages to be installed. It's because those recommended packages do not exist in the repositories. I tried to install a random package, I chose sudo apt-get install googleearth-package. It did not show the Recommended packages section (which means they are already included in the NEW packages to be installed section). To confirm this, I ran sudo apt-get --no-install-recommends install googleearth-package, and surely enough the Recommended packages section revealed itself. As for the suggested packages, I guess I won't be using --install-suggests because that just installs the suggested packages and their suggested packages.

0

There is an option --install-suggests. But as it's written in the comments I also find this option unusable because of its recursive behaviour, it pulls enormous amount of dependancies your never want.

I always want the suggested packages of the given package, and NOT the suggested packages of any package to be installed.

You can see suggested packages of the given package(s) like this:

apt show PACKAGE 2>&1 | grep ^Suggests:

This command allows you to install package(s) with suggests of only given package(s):

apt show PACKAGES 2>&1 | sed -nr '/^(Suggests|Package): /{s///;s/( \|[^,]+)?,//g;p}' | xargs apt -y install

NOTE: If package suggests a couple of alternatives like pkg1 | pkg2 it always choses the first.

You must log in to answer this question.

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