Apt-get download to current directory


















Ask Ubuntu is a question and answer site for Ubuntu users and developers. It only takes a minute to sign up. Connect and share knowledge within a single location that is structured and easy to search. There are multiple virtual machines running Ubuntu and they are all updated by the following command:. But updating each VM separately takes a lot of time to download the required packages and also uses massive amount of bandwidth which I'm running out of.

Is it possible to transfer the updated files by apt-get directly into VMs? Also, as mentioned in the answers, see Best way to cache apt downloads on a LAN? Not an explicit answer to your question, but have you considered setting up an apt proxy? I use apt-cacher-ng apt-get install apt-cacher-ng. That way you can just do apt-get upgrade without having to manually copy file around.

When one computer downloads the debs they will be stored on the proxy for the next computer that requests it. Can handle multiple releases and different architectures, etc. Quick instructions to create a local apt archive using a convenient debian tool called "apt-ftparchive". Now you can install the package normally. If apt-get asks "Install these packages without verification? That's because this local repository is not signed. Then you can locally install it with synaptic.

CedX CedX 3, 2 2 gold badges 34 34 silver badges 42 42 bronze badges. The Overflow Blog. Podcast Making Agile work for data science. Stack Gives Back Featured on Meta. New post summary designs on greatest hits now, everywhere else eventually. Visit chat. Linked 0. Related Hot Network Questions. Last Updated : 04 Apr, Previous sudo command in Linux with Examples. Next apt command in linux with examples.

Recommended Articles. Article Contributed By :. Easy Normal Medium Hard Expert. Writing code in comment? Please use ide. Find centralized, trusted content and collaborate around the technologies you use most.

Connect and share knowledge within a single location that is structured and easy to search. I'm trying to install a package on a machine with no Internet connection.

What I want to do is download all the packages and dependences on a machine WITH an Internet connection and then sneaker-net everything to the offline computer. I've been playing with the apt-get and apt-cache but I haven't figured out a quick and easy way to download the package and dependencies in one swoop to a directory of my choosing.

How would I do this? Am I going about this problem correctly? How would you install offline packages that have a lot of dependencies?

The marked answer has the problem that the available packages on the machine that is doing the downloads might be different from the target machine, and thus the package set might be incomplete.

Some packages returned from apt-rdepends don't exist with the exact name for apt-get download to download for example, libc-dev. Once downloaded, you can move the. The aptitude --download-only If you don't, I think it is better to run the following script on the disconnected debian machine:.

After that you can copy them on an USB key and install in your disconnected debian machine. This will download all the Debs to the current directory, and will NOT fail if It can't find a candidate. Somewhat simplified and what worked for me way that worked for me based on all the above Note that dependencies hierarchy can go deeper then one level.

I used apt-cache depends package to get all required packages in any case if the are already installed on system or not. So it will work always correct.

Because the command apt-cache works different, depending on language, you have to try this command on your system and adapt the command. The englisch version with the term: " Depends: " You have to change the term " yourpackage " to your wish twice in this command, take care of this!

This text is used twice in this command, if you want to adapt it to your language take care of this! You get the list of links in downloads. This will download all packages and dependencies no already installed to a directory of your choice:.

You can use apt-mirror to essentially create your own debian mirror.



0コメント

  • 1000 / 1000