1

How do I make sure the dependency listing is recursive and also download using apt (sudo apt-get download < package >) happens recursively?

I am trying to download each and every .deb file in a local folder and sudo apt-get -download is not effective in downloading given package along with the dependencies.It only downloads a particular package.

So, I am doing

sudo apt-cache depends doxygen

The output is:

  doxygen                                                                      
  Depends: libc6                                                               
  Depends: libclang1-3.6                                                           
  Depends: libgcc1                                                               
  Depends: libstdc++6                                                               
  Conflicts: graphviz                                                              
  Suggests: doxygen-latex                                                        
  Suggests: doxygen-doc                                                             
  Suggests: doxygen-gui                                      
  Suggests: graphviz                
    graphviz:i386

So, while doing

sudo apt-get download  < each dependency mentioned above >

sudo dpkg -i <each dependency mentioned above>

I get error saying libllvm is not installed, for one of the dependency.

How do I make sure the dependency listing is recursive and also download using apt happens recursively?

3
  • The recursive list is likely to be very large. How deep do you want to go?
    – user535733
    Feb 8, 2017 at 3:17
  • It is not limited. Complete depth, because I want to go through each dependency before going to my offline machine so that I do not get stuck up at my offline machine while doing installation. It would be great if I can understand the hierarchy too of dependencies, but as of now on google search, I could n't find any such solution..
    – DevBee
    Feb 8, 2017 at 3:20
  • Really what you want is not completely recursive list of all dependencies - it's the dependencies that are not already installed on the target (offline) machine - for that, you can use apt install --print-uris <package> on the offline machine. Feb 8, 2017 at 3:36

1 Answer 1

1

apt-depends (or apt depends in 16.04 and later) have a --recurse flag, but it's not as useful as you may expect:

$ apt depends --recurse hello | grep Depends | wc -l

WARNING: apt does not have a stable CLI interface. Use with caution in scripts.

102003

Your entire system is made of many thousands of interdependent packages. The applications you install on top of your system may depend only on a few packages...but indirectly on most of them.

Happily, there are better and simpler answers.

One simple way to determine uninstalled dependencies is to use apt's --simulate flag:

$ apt install --simulate doxygen

Another simple way to determine uninstalled dependencies is to use the install-script feature in Synaptic.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .