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

Re: my system packages list



On 2008-Oct-3, at 2:52 AM, Pol wrote:

I would like to install on a new station the same applications currently
installed on my laptop.
Any hints to run a script?

Assuming all of the applications were installed using apt/aptitude…

I have a script that periodically dumps a list of packages and the answers I gave to `debconf` when the package was installed. Theoretically, this can be used to restore the packages *and their configuration* to another system (or to rebuild the current system). I haven't ever needed to do the restore part, so I can't promise this works, but I got it from official Debian docs, so it's probably legit.

    #!/bin/tcsh -f

    # Keep a list of packages installed/removed on a Debian system
    #
# This list can be used to restore a system or set up an identical system.

    # location for output
    set DPKGBACKUP="/root"

    /usr/bin/dpkg --get-selections '*' > $DPKGBACKUP/dpkgselections.txt
    /usr/bin/debconf-get-selections > $DPKGBACKUP/debconfsel.txt

    # To restore…
    # dselect update
    # debconf-set-selections < debconfsel.txt
    # dpkg --set-selections < dpkgselections.txt
    # apt-get -u dselect-upgrade    # or dselect install

--
Rob McBroom
<http://www.skurfer.com/>


Reply to: