Replicate or Migrate Ubuntu Packages with Apt-Get

If you’ve ever needed to upgrade Ubuntu versions, setup a new server or do any other type of migration, this is the easiest and most satisfying way to do it.. using Apt-Get!

First on our “old” server lets use apt-get to dump a list of installed packages to a packages.txt file:

dpkg --get-selections | grep -v deinstall > packages.txt

Then on the new server, lets update Apt-Get and install from our file:

apt-get update
dpkg --set-selections < packages.txt
apt-get -u dselect-upgrade

That’s it!

This entry was posted in Technology and tagged , , , . Bookmark the permalink.

  • Anonymous

    Hi! welcome to our shop. There are manyitalian handbags designers   . http://www.accvv.com/

  • Stas

    certainly you meant this:dpkg –get-selections | grep -v deinstall > packages.txti.e. s//;

  • Stas

    grr, your comment box can’t encode html unsafe characters when posting, i meant that you got the redirect wrong in the first instruction

  • http://www.mactonweb.com/ Web design London

    If ever need to upgrade Ubuntu, setup a new server or do any other type of migration, this is the easiest and most satisfying way to do it.