Re: APT question
On Thu, Oct 05, 2006 at 05:17:14PM -0400, Roberto C. Sanchez wrote:
> On Fri, Oct 06, 2006 at 10:11:29AM +1300, Matt Parlane wrote:
> > Hi all...
> > I couldn't think of an appropriate subject, so that will have to do... :)
> > I have a couple of servers each with a bunch of packages installed,
> > and I would like some way of getting that exact bunch of packages
> > installed on a fresh Debian install. Is there any way to get some
> > list of installed packages from the old machine and feed it into
> > apt-get on the new machine?
> If you have done lots of customization, then consider systemimager.
> If you just need the same packages installed and are not concerned so
> much about configuration, then `dpkg --get-selections >pkgs.out` will
> create a text file with the package selections and then `dpkg
> --set-selections <pkgs.out` will set dpkg to try and install those same
> packages the next time you do something, e.g., in aptitude.
For some (or a lot actually) settings, you can use debconf:
debconf-get-selections > debconfselections.txt
debconf-set-selctions < debconfselections.txt
You need to do this prior to dpkg --set-selections.