Migration of a Debian System

One of my little projects this week was migrating my main desktop, which runs Debian, to new hardware. The easiest way to do this, for anyone else who needs to:

1) Install Debian on the new machine (in my case, I went from a 32-bit install on a P4 to a 64-bit install on an Athlon 64. Obviously, it doesn’t need to be the same version.)

2) Generate a list of the packages on the old machine with:

dpkg –get-selections | grep -v “deinstall” | awk ‘{print $1}’ > ~/package_list.txt

3) Copy your home directory to the new machine with something like:

scp -r [username]@[old machine IP]:/home/[username] /home/[username]

4) Install all of the same packages with:

cat package_list.txt | xargs apt-get install

Since all of the preferences are stored in your home directory, you should now have a perfect clone of your old desktop on your new machine.

5 Responses to “Migration of a Debian System”

  1. Pitt says:

    OK, I’ll bite…how do I create my own gallery and upload photos? There doesn’t seem to be a link to do so.

  2. matt says:


    Honestly, I don’t know — the photo management software that I use does it all automatically. I assume that you don’t have the “add album” link on the left side of the window in the gallery?

  3. Pitt says:

    No, I don’t see that link.

  4. matt says:


    Okay, I set up a new album (the creatively named “Pitt’s Album”) and set you as the owner. You should be able to go in there (click where it says “no thumbnail”) and add pictures.

  5. Pitt says:

    Thanks, friend. I put up the pics of the Olds. Go there and be prepared to drool.

Leave a Reply