Dumping a list of installed packages on a Debian system

Yes, Todd, I’m posting an update from work. This’ll save me from wasting time on Google later in life.
Use the command dpkg --get-selections to generate a list of all the installed packages. If you want to replicate a system quickly (say, for disaster recovery or system deployment), redirect the package list to a file (dpkg --get-selections >packagelist). Then, as long as you have a copy of the file, you can install a minimal Debian system and turn it into a replica of the other system with nothing more than an Internet connection and a few commands:


dpkg --get-selections |sed 's/\(de\)*install/purge/' | > dpkg --set-selections
dpkg --set-selections dselect install

And they say Windows’ TCO is lower than Linux…

2 thoughts on “Dumping a list of installed packages on a Debian system

  • December 9, 2002 at 1:53 pm
    Permalink

    Todd checks this to see if we update from work? Yikes! Um, I only update to keep myself from needing Google too, for work-related stuff only. Yeah, that’s it.

  • December 9, 2002 at 4:51 pm
    Permalink

    Yeah, and I only read the work related stuff. Really enjoy all the articles on scheduling appointments.

Comments are closed.

%d bloggers like this:
WordPress Appliance - Powered by TurnKey Linux