How do I preserve installed applications when migrating Ubuntu to another platform?

michaeljoseph picture michaeljoseph · Oct 9, 2008 · Viewed 16.9k times · Source

I'm looking at maybe moving from an older AMD64 to a new Intel dual-core which is 32 bit. Installation isn't a problem but can I transfer all the installed apps? I haven't been able to find anything so far on Google except where the migration is to a similar platform and file-system. I won't change the filesystem but the platform will be different. Is there something on the lines of the "World" file in Gentoo?

Answer

Michael Trausch picture Michael Trausch · Oct 9, 2008

You can save your list of packages easily: see "man dpkg" and search for --set-selections and --get-selections.

The basic of it, though is that to save the list of packages:

dpkg --get-selections > package_list

To restore that list on another system:

cat package_list | sudo dpkg --set-selections && sudo apt-get dselect-upgrade

Moving across architectures means that there will be some packages unavailable. They will be ignored; for example, ia32-libs will not be installable on a 32-bit system. That selection will be ignored if you're moving from x86-64 to x86.