9

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.

3

With a little bit awk:

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

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.