Skip to content
Home » Linux » Dumping a list of installed packages on a Debian system

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…

If you found this post informative or helpful, please share it!

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

  1. 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.

Comments are closed.

%d bloggers like this: