copying *.deb files into /var/cache/apt/archives ?

Goh Lip g.lip at gmx.com
Wed Jul 28 03:58:36 UTC 2010


On 07/28/2010 03:55 AM, Marius Gedminas wrote:
> On Wed, Jul 28, 2010 at 05:45:35AM +0800, Goh Lip wrote:
>> On 07/27/2010 09:06 PM, Mihamina Rakotomandimby wrote:
>>>> a24061 at ducksburg.com :
>>>> If I do a distribution upgrade on my machine at work, then copy the
>>>> /var/cache/apt/archives/*.deb files onto a USB hard drive, take it
>>>> home, and copy them into /var/cache/apt/archives there (where the
>>>> network connection is much slower), would the distribution upgrade
>>>> successfully pick them up (to save downloading time)?
>>>
>>> When I made that, it worked.
>>>
>>
>> Strange that it could work just like that.
>
> No it isn't.  That's the way apt works.
>
>> (make sure nothing is
>> downloaded). Adam, if that works out as Mihamina said, would appreciate
>> if you let us know, or others could confirm this as well.
>
> I've been doing this for years, on Debian and on Ubuntu machines.
>

Okay, thanks for your input, but tried that several times, but that was 
some years ago and didn't work, till I found out about package.gz.

Is it possible that yes, the deb files are in there but the packages are 
not installed and update/upgrade will still pull in the packages from 
the repositories and not from /var/cache/apt/archives as I found out 
years back?

>> If not, then at the directory where the deb files are copied to,
>> sudo dpkg-scanpackages . /dev/null | gzip -9c>  Packages.gz
>
> There's never a Packages.gz in /var/cache/apt/archives; it's just a
> bunch of files.
>

Yes correct, but scan-packages will generate this Packages.gz. which is 
necessary for apt to 'register' what packages are available in the cd.

> Marius Gedminas
>


Will try this out again next upgrade. Thanks.
Regards - Goh Lip





More information about the ubuntu-users mailing list