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 /var/cache/apt/archives/
.
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 /var/cache/apt/archives/
.
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
packages using apt-cache
.
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
the file packagelist
#!/bin/bash
for package in `cat packagelist`
do
apt-get install -y --download-only $package
done
Save it.
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 /etc/apt/sources.list
in /var/cache/apt/archives
directory
You can use a tool called apt-cacher. You can check this link for more info. Hope it helps.
mirror.list
. Where as the same addresses work well when defined insources.list
. So i am looking for an alternate way. – Nejat Oct 02 '14 at 12:59trusty
,trusty-security
andtrusty-updates
(main
,universe
,multiverse
,restricted
) takes me about 103GB. – muru Oct 02 '14 at 13:07