Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

If I want to install a package and its Suggests dependencies, I run:

$ sudo apt-get --install-suggests install <package name>

However, if <package name> is already installed, and not all Suggests dependencies are installed, 'nothing' happens... those remaining dependencies remain uninstalled. Is there a solution for this, beyond writing code?

share|improve this question
up vote 6 down vote accepted

You can accomplish this using the advanced searching features of aptitude. The following will install packages suggested by network-manager:

aptitude install '~Rsuggests:^network-manager$'

From the aptitude HTML documentation:

?reverse-depType(pattern), ~R[depType:]pattern

depType may be either “provides” or one of the dependency types given in the documentation of ?broken-depType. If depType is not present, it defaults to depends.

If depType is “provides”, matches packages whose name is provided by a package version matching pattern. Otherwise, matches packages which a package version matching pattern declares a dependency of type depType upon.

share|improve this answer

A less standard solution:

$ wajig installsuggested network-manager

Usage info:

$ wajig installsuggested --help
usage: wajig installsuggested [-h] [-r | -R] [-y] [-n] [-d DIST] [-s | -t]

Install a package and its Suggests dependencies

positional arguments:

optional arguments:
  -h, --help            show this help message and exit
  -r, --recommends      install Recommend dependencies (Debian default)
  -R, --norecommends    do not install Recommend dependencies
  -y, --yes             skip 'Yes/No' confirmation prompts; use with care!
  -n, --noauth          do not authenticate packages before installation
  -d DIST, --dist DIST  specify a distribution to use (e.g. testing or
  -s, --simulate        simulate command execution
  -t, --teach           display commands to be executed, before actual
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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