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

Re: how to download packages



Howdy,

* Jeff <jcoppock1@attbi.com> [020808 06:16]:
> How can I download to cache all the installed packages that aren't
> already there?  apt-get with the -d option won't do it if the package
> is installed and up-to-date.  Is there a way to down load the debs
> based on my package selections?

You can download all the latest versions of the packages you have
installed with:

apt-get --download-only --reinstall install  \
`dpkg --get-selections | grep '\<install\>' | cut -f1`

make sure it's all on the one line.

However you my have some problems with packages that no longer exist. So
perhaps its best to do in steps.

1. Make a list of all packages.

dpkg --get-selections | grep '\<install\>' | cut -f1 | sort > pkgnames.txt

2. apt-get them

apt-get -download-only --reinstall install `cat pkgnames.txt`

3. Deal with the errors from unavaliable packages.

When apt-get complains:
Sorry, re-installation of foo is not possible, it cannot be downloaded

edit pkgnames.txt and delete foo. then go back to step 2.



Cheers,

Nick.

--
Debian testing/unstable
Linux onefish 2.4.18-lavienx #1 Tue Jun 25 19:07:48 EST 2002
i686 unknown unknown GNU/Linux



Reply to: