I used to install packages with dpkg -i *.deb command for off-line installation. Because all deb files are in one folder.

I want to avoid dependency error and stop installing packages as broken.

Ultimately my aim is to check dependencies and generate download script (if all dependencies are not satisfied) for only those package which is missing in mentioned folder. so-that I can first download missing packages and Then confidently install package by dpkg -i *.deb

apt-cache showpkg $(find -iname '*.deb' -exec dpkg --info '{}' \; | awk '/Package:/ {print $2}') shows dependencies but long list and not helpful to check whethter it is satisfied (exist) in mentioned folder or not. Also dpkg -I *.deb errors following:

   dpkg-deb: 'cabextract_1.4-4_i386.deb' contains no control component 'chromium-codecs-ffmpeg-extra_34.0.1847.116-0ubuntu2_i386.deb'
   dpkg-deb: 'cabextract_1.4-4_i386.deb' contains no control component 'flashplugin-installer_11.2.202.350ubuntu1_i386.deb'
so on for each deb

Hence, That commands are not useful for me.

Further Clarification:

  1. First check all deb dependencies in my folder.
  2. according to package already installed, check this deb's are able to installed without dependency error or not.
  3. if yes then execute dpkg -i *.deb
  4. else list missing package which not fond installed or in mentioned folder


  • 1
    Do I understand correctly that you expect to get a complete script from us? Why don't you use the results and write it yourself? – guntbert Apr 26 '14 at 19:21
  • This question is no longer supported from my side because now I am using Local repository method to install debs offline (as APT is standard method) – Pandya Dec 2 '14 at 5:53

You can always try a dry run before the install,

dpkg --dry-run -i *.deb

You can get a list of the packages dependencies with:

find *deb -exec dpkg -f {} Depends \;

You can also try one of these

 dpkg -I package
 apt-cache rdepends package.deb
 apt-cache showpkg package-name

this one is a combination of steps incase it's just a .deb file

 ar -x <package-name>.deb
 tar -xzf control.tar.gz
 grep Depends control


 apt-cache depends package-name

for example

 apt-cache depends mplayer

but i think the last option is what might serve you best

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