Migrate System Packages Ubuntu

By | 2011/01/11

How can I migrate a set of installed packages from one system to another in Ubuntu or Debian?

Using dpkg you can create a list of installed packages which can then be applied to another system. This is also great for making an apt-get ‘backup’ of your desired package install.

1. On the old system:

sudo dpkg --get-selections > packages.txt

2. Then copy that packages.txt file to your new system, and issue:

sudo dpkg --set-selections < packages.txt

3. And lastly:

sudo apt-get dselect-upgrade

Sweet!

Leave a Reply

Your email address will not be published. Required fields are marked *

Notify me of followup comments via e-mail. You can also subscribe without commenting.