Web lists-archives.com

Re: Upgrading with a low data cap

On Mon 08 Oct 2018 at 08:06:56 (+0000), Curt wrote:
> On 2018-10-07, Richard Owlett <rowlett@xxxxxxxxxxx> wrote:
> > All my machines have use Stretch DVD1 for installation.
> > I have a low monthly data cap - currently at my limit.
> > One machine has an apt-get update and upgrade with the addition of some 
> > packages not on DVD1.
> > I've not intentionally deleted any cached files.
> > Is it possible to use the cached data on another machine?
> > What should I be reading?
> > TIA
> I gave a perfunctory gander at the following page.
> https://www.pcsuggest.com/reuse-deb-files-to-install-software-in-many-offline-machine/
> I found the "echo 'Acquire::Languages "none";' > /etc/apt/apt.conf.d/99no-translation" 
> tip of particular interest (actually that's not how he does it but the result is the same).
> This apparently avoids the downloading of the supernumerary Translation
> files which only those living on the Babel Tower really have a pressing
> need for.
> I'm reading that you won't have long descriptions (with apt-cache?) with this
> parameter toggled on.
> man apt.conf Languages section for details (which I'm too stupid to
> really grasp entirely but whatever).

On this 1843-package stretch the statistics are:
 45MB /var/lib/apt/lists/*Packag*
 31MB /var/lib/apt/lists/*Translat*
 40MB /var/lib/apt/lists/*Sourc*
 67MB /var/lib/apt/lists/*Contents* (for apt-file I believe)
182MB total

OTOH freshly installed 1819-package (no DE) system gives:
$ du -sh /var/cache/apt/archives/
du: cannot read directory '/var/cache/apt/archives/partial': Permission denied
2.9G    /var/cache/apt/archives/

This laptop runs a mature¹ apt-cacher-ng for wheezy/jessie/stretch
systems with the default expiration parameters and gives:
$ du -sh /var/cache/apt-cacher-ng/
13G     /var/cache/apt-cacher-ng/

I would call that a pretty marginal saving. I've never bothered to
play with lists the same way as I did with packages. And really, the
hint is in the file locations: mess with /var/cache/ all you like,
but don't mess with /var/lib/. If you screw /var/cache/, it's
legitimate to delete it. You *can* clear specifically
/var/lib/apt/lists/ (leave partial/ and lock) but that's not the
same as juggling them.

Under "KNOW THE RISK", it spells out the self-imposed problem with
the method outlined below. dpkg -i *deb   is a stupid thing to do
under the circumstances. Far better to stuff the cache with debs
and leave the apt family do their job.

¹ Looks like I started it running in May 2014 by importing at least
1500 packages without preserving their timestamps. The entirety has
been reimported twice since, from wheezy via jessie to stretch.