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

Re: auto-download deb files that are already installed



On Thu, Aug 03, 2006 at 08:10:48 -0400, Chuckk Hubbard wrote:
> Hi.  I'm still working on this un-networked laptop.  It's looking
> pretty good, now I'm ready to put the audio apps on it that I use.
> I made a list from Synaptic of the packages I have on the desktop, and
> now I'm hoping to download all the packages and put them on my flash
> drive.
> If I put "apt-get -d install pkg", I just get a message that it is
> already the latest version.  Is there a way around this?  Maybe with
> dpkg?  I couldn't find any options that accounted for this.
> 
> The only thing I can think of- that doesn't involve making monstrous
> lists of dependencies and downloading all the debs individually- would
> be to uninstall all these packages, then run apt-get -d install, save
> all the debs to my flash drive, and then reinstall them.
> 
> Is there some other way to fool apt into thinking the packages aren't there?

First of all, you might not have to download the packages again as they
might still be in the package cache on the desktop computer. Check
/var/cache/apt/archives/
(I suspect that you know this; I just wanted to make sure.)

If you have to download some packages again you could try to use apt-get
with "--reinstall" and "-d". However I have never tried myself if
"--reinstall" has the desired effect when used together with "-d". I
think the best thing would be to use aptitude: "aptitude download
package" will download the .deb for "package" to the current working
directory. You can do this as a normal user, so there is no risk of
screwing up anything in your installation. If you have a text file
"packages.txt" with the names of the packages (one name per line), then
you can simply run

aptitude download $(cat packages.txt)

and they will all be downloaded in one go.

Also check out "apt-zip" which is specifically intended for the kind of
situation you are in.

-- 
Regards,
          Florian



Reply to: