Using /var/cache/apt
Nigel Henry
cave.dnb2m97pp at aliceadsl.fr
Mon Feb 9 14:26:19 UTC 2009
On Monday 09 February 2009 12:56, Robert Parker wrote:
> A friend is moving his Ubuntu install from a usb stick to a dedicated
> partition on his hard drive. He wants to avoiding downloading all of
> the updates into the new installation.
>
> How to reuse the packages in /var/archives/apt?
>
> He will naturally be making a backup copy of /var as well as /home
> before starting off.
>
> Thanks,
> Bob Parker
Hi Bob.
In my case I have a FAT32 partition on another harddrive where I save the
archives from various distros, and that partition is accessable from all the
distros that are on that machine. I simply click on the desktop icon for the
Fat32 partition, open the directory for the distro where I want to save the
archives, then I'm ready to go.
Next open Nautilus on Gnome, and navigate to /var/cache/apt. Right click on
the archives directory, click copy, then paste the directory into the open
directory on the FAT32 partition (which doesn't need root permissions to
paste to). During the paste process you'll get a pop-up "can't copy the lock
file", just press skip, and the paste will proceed to completion.
Going the other way, from the FAT32 partition to the distro where you want to
copy the archives to, you'll need write permissions to write
to /var/cache/apt. With Gnome that I don't use much, sudo nautilus in a
terminal, navigate to /var/cache/apt, click copy on the archives directory in
the FAT32 partition, and paste into /var/cache/apt directory in the open root
accessable Nautilus. You'll be asked what you want to do, so click "merge
all", if your in Gnome, or if in KDE "overwrite all", then the paste will
proceed.
Of course you'll need access to both locations, and make sure that when you
paste, that it's into the /var/cache/apt directory, not
into /var/cache/apt/archives, otherwise you'll end up with an archives
directory within the existing archives directory.
Anyway, that's how i do it with gui apps.
All the best.
Nigel.
More information about the ubuntu-users
mailing list