Recently I tried to install a package and it's suggests by using

apt-get install tuxguitar --install-suggests

although this worked, there was far more installed than I bargained for. A total of 1308 packages were installed, including PovRay, Fortran, TexLive, Apache2, gnucash... You get the picture. None of these items were in the install-suggests list as presented by apt-get install tuxguitar, so I must assume that the --install-suggests option recursively looks at the packages requested and their install-suggests until a 'full' set of packages is created.

Is there a clean method of limiting this recursion?

It's not that I'm really complaining much about some of the programs (I like PovRay), but I like adding to my system a little at a time, trying to make sure that the OS is staying stable!

  • If this doesn't exist as an option, it would be a great feature to have in apt-get, perhaps as an optional parameter after --install-suggests, so to only install the suggests for the requested package, the syntax would be --install-suggests 1 or --install-suggests=1 – Blake R Sep 11 '14 at 20:15
  • I agree - these is a point to the initial suggests, but as the case I used for an example shows, it can go a little too far! – Charles Green Sep 11 '14 at 20:31

You can install only the directly suggested packages with

LANG=c apt-cache depends tuxguitar|grep -i suggests

(LANG=c to get the english output)

PACKAGES="tuxguitar otherpackage"
SUGGESTS=$(LANG=c apt-cache depends $PACKAGES|grep -i suggests|cut -d' ' -f4|xargs)
sudo apt-get install $PACKAGES $SUGGESTS

in your case and in one line:

PACKAGES=tuxguitar; sudo apt-get install $PACKAGES $(LANG=c apt-cache depends $PACKAGES|grep -i suggests|cut -d' ' -f4|xargs)
| improve this answer | |

There doesn't appear to be a way to do that based on this man page.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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