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?

2 Answers 2


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.


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

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.