[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: the apt-get cache, backing up and using to install debain on another machine



On Sunday 06 October 2002 13:20, Jim Hribar wrote:
> I used apt-get to install the packages I wanted on my Debian machine
> after a "network install".  I know that apt-get caches downloads so you
> don't have to download the packages more than once.
>
> How could I backup these "cached" packages?  Where are they? I intend
> just to move them to another machine using ftp.

/var/cache/apt/archives

you can just add pacakges there, and apt automatically sees them (ie, you  
don't need to run any commands to get apt to find them).  In other words, if 
you did "apt-get install foo", and apt said "need to download 500kb", and 
then you immediately hit conrtol C to kill it, move the foo deb into the 
cache directory, and issue the apt-get command again, it would now say "need 
to download 0kb/500kb".

> Additionally, I want to install Debian on another machine (I have no
> CDs, just the network-install disks).  Could I somehow install Debian
> (fresh) by pointing the install to my current machine and/or package
> cache?

on old machine:
dpkg --get-selections > selections.txt

on new machine:
cat selections.txt | dpkg --set-selections
apt-get install

if I understand things correctly, after doing that and copying over your /etc 
directory, you should have an install almost identical to your previous one.

-jason pepas



Reply to: