5

Or: what is the proper way of installing missing suggests for installed packages?

  • Good Question! I would caution the use of --install-suggests however, as on occasion I have found that it installs much, much more than wanted. – Charles Green Dec 4 '14 at 23:27
  • Yes :) But apt-get install --install-suggests lists and asks you if you want to install the stuff. You can browse it beforehand. Sometimes there's plugins and neat stuff in there and it's very convenient to have it all in one go. The problem is when you already have the main package installed. – fullmooninu Dec 5 '14 at 14:26
  • yes, but sometimes it is confusing: apt-get install tuxguitar -s vs apt-get install tuxguitar --install-suggests -s The first command will list some suggested packages, but the second will download well more than a GB, and goes way further in installation than the first would have suggested. – Charles Green Dec 5 '14 at 14:33
  • Yeh, I agree. It goes all the way through the suggests of the suggests, right? Maybe something to limit the depth level would be really nice? – fullmooninu Dec 5 '14 at 16:13
  • I had asked a while back if there was a way to limit the recursion in apt-get, but there was not a suitable answer. – Charles Green Dec 5 '14 at 16:16
3

You can use search patterns with aptitude to list suggested packages and then feed them to install. E.g., for tomboy:

sudo aptitude install '~Rsuggests:tomboy'

Warning: be extremely careful doing this. You can easily have thousands of packages installed or upgraded in one go.

  • Hmm, this is weird because it will "try" to install the wrong architecture versions of the plugins too, and has that "no solution found within the allotted time" thing =( – fullmooninu Dec 5 '14 at 18:49
  • It is possible that some of the suggested packages are not available for your architecture, resulting in an even more complex installation tree. This largely depends on the target package and the set of suggestions associated with it. Considering your inexperience, I would strongly advise you not to proceed with this sort of changes. – Luís de Sousa Dec 6 '14 at 9:21
  • who says I'm inexperienced? Try and do that to audacity, you'll see, what I'm talking about. It has both architectures, it just can't figure it out right. – fullmooninu Dec 9 '14 at 11:00
2

There is no such option, but you can find out and install the suggested packages with apt-cache depends:

PACKAGES="package1 package2 ..."
LANG=c apt-cache depends $PACKAGES |grep -i suggests

(LANG=c to get the english output)

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

or in one line:

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

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.