Skip downloading things twice?

Questions about applications and software
Forum rules
Before you post please read this

Skip downloading things twice?

Postby Cityscape on Mon Feb 25, 2013 10:41 pm

If I have 2 computers both running Linux Mint 14 (or even if both ran Lubuntu or something) how could I avoid download updates or new software twice? I have a limited bandwidth connection, meaning I pay for how much data I use. So if I download 0 AD (roughly 300 MB game) on the one computer I'd like to not have to redownload it for the other. Same thing for system updates. :?

I read a few years ago how to do this... and it involved copying over files from a certain folder but I don't remember what folder that even was anymore.
Image
User avatar
Cityscape
Level 1
Level 1
 
Posts: 23
Joined: Sat Jan 19, 2013 7:54 pm

Linux Mint is funded by ads and donations.
 

Re: Skip downloading things twice?

Postby passerby on Tue Feb 26, 2013 12:43 am

You could mount /var/cache (or, more specifically, /var/cache/apt) on a separate partition.
When you download updates, they stay in /var/cache/apt/archives until you remove them.
If you have both installations mounting the same /var/cache partition, you'll only need to download updates once, then apply them separately on each.
Home PC: Xubuntu 14.04 x64, Nvidia GTX650, i7 3770K, 16GB RAM, Asus Xonar DX
Work PC: Mint 13 x64 XFCE, Nvidia GT620, i5 3470, 8GB RAM
Laptop: System76 Kudu Pro, Xubuntu 14.04 x64

My HTML5 login themes + screenshots
User avatar
passerby
Level 6
Level 6
 
Posts: 1375
Joined: Sun Dec 16, 2012 7:29 pm

Re: Skip downloading things twice?

Postby Cityscape on Tue Feb 26, 2013 2:31 am

passerby wrote:You could mount /var/cache (or, more specifically, /var/cache/apt) on a separate partition.
When you download updates, they stay in /var/cache/apt/archives until you remove them.
If you have both installations mounting the same /var/cache partition, you'll only need to download updates once, then apply them separately on each.

I actually have several different computers, not several distributions on the same PC.

But so if I downloaded the updates on 1 computer I could just copy the contents of /var/cache/apt/archives onto my other computer and install updates without downloading, right?

Where do the install files for programs download to when I install them?
Image
User avatar
Cityscape
Level 1
Level 1
 
Posts: 23
Joined: Sat Jan 19, 2013 7:54 pm

Re: Skip downloading things twice?

Postby passerby on Tue Feb 26, 2013 3:47 am

That should work, yes.
If you want to install the programs via synaptic or another such tool, copy the program's packages into /var/cache/apt/archives along with the "update" files.
Otherwise you can single out the installation file and install the .deb file manually.
Home PC: Xubuntu 14.04 x64, Nvidia GTX650, i7 3770K, 16GB RAM, Asus Xonar DX
Work PC: Mint 13 x64 XFCE, Nvidia GT620, i5 3470, 8GB RAM
Laptop: System76 Kudu Pro, Xubuntu 14.04 x64

My HTML5 login themes + screenshots
User avatar
passerby
Level 6
Level 6
 
Posts: 1375
Joined: Sun Dec 16, 2012 7:29 pm

Re: Skip downloading things twice?

Postby Cityscape on Tue Feb 26, 2013 4:44 am

passerby wrote:That should work, yes.
If you want to install the programs via synaptic or another such tool, copy the program's packages into /var/cache/apt/archives along with the "update" files.
Otherwise you can single out the installation file and install the .deb file manually.

If I install a program on one computer via Synaptic, mintinstall etc, where does it download the installation packages to? Is that also /var/cache/apt/archives?
Image
User avatar
Cityscape
Level 1
Level 1
 
Posts: 23
Joined: Sat Jan 19, 2013 7:54 pm

Re: Skip downloading things twice?

Postby eanfrid on Tue Feb 26, 2013 5:01 am

Yes. All package managers (apt, aptitude, synaptic, mintinstal, etc) are only text or GUI frontends.

Regarding what you want to do, have a look to the packages "apt-cacher" or "apt-cacher-ng", made to manage a single local apt cache/proxy for multiple computers on your LAN.
Main desktop: Debian GNU/Linux Wheezy 64bit - MATE 1.8.1
(i5 2400@3.7GHz - 16GB DDR3 - HD6770 w/radeon driver - SSD+RAID1)
Safer than Dropbox
User avatar
eanfrid
Level 7
Level 7
 
Posts: 1871
Joined: Mon Apr 30, 2012 2:49 am
Location: FR

Re: Skip downloading things twice?

Postby Cityscape on Tue Feb 26, 2013 6:31 pm

Okay, so do the files for software installs AND system updates both get downloaded into /var/cache/apt/archives?

I'll take a look at apt-cacher too.
Image
User avatar
Cityscape
Level 1
Level 1
 
Posts: 23
Joined: Sat Jan 19, 2013 7:54 pm

Re: Skip downloading things twice?

Postby eanfrid on Tue Feb 26, 2013 6:51 pm

All packages downloaded by any deb package manager are stored "by-design" in /var/cache/apt/archives. If you want them to be stored elsewhere, you have to modify the apt-config "Dir::Cache" variables tree or create according symlinks. Check with
Code: Select all
apt-config dump | less
Main desktop: Debian GNU/Linux Wheezy 64bit - MATE 1.8.1
(i5 2400@3.7GHz - 16GB DDR3 - HD6770 w/radeon driver - SSD+RAID1)
Safer than Dropbox
User avatar
eanfrid
Level 7
Level 7
 
Posts: 1871
Joined: Mon Apr 30, 2012 2:49 am
Location: FR

Re: Skip downloading things twice?

Postby Cityscape on Tue Feb 26, 2013 7:26 pm

eanfrid wrote:All packages downloaded by any deb package manager...

Does that include the update manager?
Image
User avatar
Cityscape
Level 1
Level 1
 
Posts: 23
Joined: Sat Jan 19, 2013 7:54 pm

Re: Skip downloading things twice?

Postby eanfrid on Wed Feb 27, 2013 3:22 am

eanfrid wrote:All package managers

eanfrid wrote:All packages downloaded

What is more than "all" ? :D
Main desktop: Debian GNU/Linux Wheezy 64bit - MATE 1.8.1
(i5 2400@3.7GHz - 16GB DDR3 - HD6770 w/radeon driver - SSD+RAID1)
Safer than Dropbox
User avatar
eanfrid
Level 7
Level 7
 
Posts: 1871
Joined: Mon Apr 30, 2012 2:49 am
Location: FR

Linux Mint is funded by ads and donations.
 

Return to Software & Applications

Who is online

Users browsing this forum: Bing [Bot], kevs8811 and 14 guests