Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

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
add comment

2 Answers

up vote 4 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
add comment

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]
                              package

Install a package and its Suggests dependencies

positional arguments:
  package

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
                        experimental)
  -s, --simulate        simulate command execution
  -t, --teach           display commands to be executed, before actual
                        execution
share|improve this answer
add comment

Your Answer

 
discard

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.