5

I have a legacy Ubuntu Server 12.04 (i386) and a new Ubuntu Server 12.04 LTS (AMD64)

How do I use the same list of packages from the legacy server on the AMD64 server? I tried this:

dpkg --get-selections > installedpackages

But when I use that list on the new server it tries installing i386 libraries and binaries. I don't want that. I only want the AMD64 stuff.

I used this post as a guide

How to list all installed packages

Any help is appreciated.

Malocchio
  • 123
  • 2
  • 7
  • possible duplicate of [Best way to backup all settings, list of installed packages, tweaks, etc?](http://askubuntu.com/questions/9135/best-way-to-backup-all-settings-list-of-installed-packages-tweaks-etc) – Eliah Kagan Aug 17 '14 at 21:57

1 Answers1

6

Try this command line to generate your package list instead (you'll need to apt-get install aptitude if you haven't):

aptitude search -F '%100p' '~i!~M' > installedpackages

This should omit all those machine-specific preinstalled packages and only list things you deliberately selected (and their dependencies).

If even that has too much stuff in it, this should list more or less just the packages that you have explicitly installed (their dependencies will be pulled in automatically, of course):

deborphan -a --no-show-section > installedpackages

tgies
  • 509
  • 2
  • 10
  • Consider that tip stolen as of now! -Thanks – Scott Goodgame Mar 26 '13 at 23:04
  • @ScottGoodgame See the edit for another (possibly better) way. – tgies Mar 26 '13 at 23:25
  • This is what I was looking for. Now I can migrate my configs from /etc, and web apps from /opt and /var/www. Still working on getting all the MySQL grants from one server to another. Might replicate that DB. – Malocchio Mar 27 '13 at 02:22
  • @Malocchio On that topic, check out [this question on Stack Overflow](http://stackoverflow.com/questions/4073808/copying-permissions-from-one-mysql-database-to-another). – tgies Mar 27 '13 at 04:54