12

I previously installed a package with the --no-install-recommends and am now missing some functionality due to these packages missing. Is there a way to install these packages with an apt-get command without completely uninstalling it (as this will remove a plethora of dependent packages as well)?

I know I can use apt-cache depends *packagename* | grep Recommends to get a list of these packages, which I can then manually install and manually set to autoinstalled. However I would like to know whether you can do this automatically with apt-get.

0

1 Answer 1

5

With a little bit awk:

apt-cache depends YOUR_PACKAGE | \
    awk '/Recommends:/ {system("sudo apt-get install "$2"; sudo apt-mark auto "$2)}'
1
  • 3
    But this is not recursive, contrary to the automatic installation of recommended packages.
    – vinc17
    Oct 26, 2017 at 11:47

You must log in to answer this question.

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