Is there any way to just download all Ubuntu repositories using
apt-get? I am looking for something like :
sudo apt-get install --download-only *
So that I can access the downloaded repository in the directory
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It only takes a minute to sign up.Sign up to join this community
First of all, this is not a convenient way. Instead of this you should use the method mention here. But as an answer to the question.
First create a file which contains names of all the available
apt-cache dumpavail |grep -oP "(?<=Package: ).*" >> packagelist
This will create a file
packagelist with all the available packages.
Now create a simple script to download all the packages present in
#!/bin/bash for package in `cat packagelist` do apt-get install -y --download-only $package done
Make it executable using
chmod +x your_script_name
Now open terminal and login as root
sudo -i cd /folder/of/you/script ./you_script_name
It will download all the available package depending upon your
You can use a tool called apt-cacher. You can check this link for more info. Hope it helps.