Ask Ubuntu is a question and answer site for Ubuntu users and developers. 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

I have a package.deb and want to install all dependencies (Depends field in debian/control) and all recommend packages (Recommends field in debian/control).

Options considered so far:

  • Gdebi apparently does not support installing recommend packages.
  • "sudo dpkg -i package.deb" followed by "sudo apt-get install --install-recommends -f" also only installs dependencies (Depends field in debian/control), but not recommend packages (Recommends field in debian/control).

Any other ideas?

share|improve this question
up vote 1 down vote accepted

One solution would be to set up your personal APT repository and install the package with APT from there.

Another possibility is to extract the dependencies from the package description. This script pulls the Recommends: line from the description in the .deb file and removes versions and keeps only the first alternative when there are several.

apt-get install $(dpkg-deb -I foo.deb |
                  sed -n 's/^ *\(Depends\|Recommends\)://p' |
                  tr , $'\n' |
                  sed 's/[|(].*//')

With aptitude, you can install the set of packages matched by a pattern. If there are alternatives, install the one you want first.

aptitude install '?reverse-recommends(foo)'

From the aptitude full-screen interface, highlight the package, press Enter, navigate to “Recommends” and press + then g.

share|improve this answer

there is a parameter in dpkg named --nodependencies ( that was in earlier days ) today parameter is named - see in man page -

--ignore-depends=package,... Ignore dependency-checking for specified packages (actually, checking is performed, but only warnings about conflicts are given, nothing else).

you could try that, but it can be a risk too.

I know only that mostly the risk is not so high. in terminal/konsole :

dpkg -i --ignore-depends=package1,package2,package3... package-to-be-installed-name.deb

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.