Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I'm using Ubuntu 12.04 and I would like to use apt-get to download a package and all of it's depenedcies. Those packages will have to be installed on computers with no internet connection, so in addition to the base package I also need to all of the package's dependcies as well. Is there an easy way to do this (like in muon package manager)?

I know that I can use the apt-get download command for this, but I don't want to manually specify each package that muon recommends to install or upgrade.

share|improve this question

2 Answers 2

up vote 2 down vote accepted

This command simulates installing a package and displays all dependencies (hint: use grep):

apt-get -s install package
share|improve this answer
    
+1 for the hint. I ended up using apt-offline. –  Velislav Marinov Nov 25 '12 at 2:11

from the non-networked machine, run apt-get --print-uris install packagename this wont try to download, but will give a list of urls it would download if it were networked. You can then take this list to another machine to do the downloading.

Also take a look at the apt-zip package, which creates a script using this output that you can run on another machine to wget the packages.

share|improve this answer

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.