Saving Installed Packages Before Reinstalling Feisty

Derek Broughton news at pointerstop.ca
Fri May 25 13:55:11 UTC 2007


Luigi wrote:

> On 5/25/07, Arnold Pietersen <arnold.pietersen at cecs.org.za> wrote:
>>
>> I want to reinstall Feisty.  However, I want to save the packages which
>> I installed to a CD so that when I reinstall Feisty, I can reinstall
>> those packages from CD instead of having to go on the Internet;
>> bandwidth is a problem.  Is it possible? If so, how?
>>
> dpkg --get-selections \* > old-system-selections.txt
> 
> install the system on the new PC/hd with the CDs and then restore your
> selections:
> 
> dpkg --set-selections < old-system-selections

That only provides the _list_ of installed packages.  It doesn't solve his
bandwidth problem.
> 
> Now you can use whatever method you like best to install selections ;-)
> synaptic, aptitude, etc... all have a way to do this. I like dselect:

Unfortunately, you've likely left it far too late to think of this :-(

"apt-move" is a simple way to build a cache of all the packages you've
installed, but you need to use it regularly, or apt-get/aptitude will clean
the local cache.

Given the right options, apt-move will build its cache first with what's
available in /var/cache/apt/archives, then fetch any package files that
aren't still around from your mirror, but that's likely to be most of your
installed packages.

You _can_ simply copy the contents of /var/cache/apt/archives to a CD,
create a Packages file for them, and use a file: line
in /etc/apt/sources.list to refer to it.  Googling for "apt local mirror"
should give you the technique for creating the Packages file.  Apt-move is
easier.
-- 
derek





More information about the ubuntu-users mailing list