How do I install the same packages on amd64 as 32-bit

Asked by tomdean

I have a 32-bit system, 10.04 LTS, I have used for several years.

I have a new 64-bit system with ubuntu 11.04 amd64 on it.

I want the same packages, as far as possible, on the amd64 system as are on the 32-bit system.

Also, I like the 10.04 LTS desktop better than the 11.04 amd64 desktop.

How do I do this?

tomdean

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu apt Edit question
Assignee:
No assignee Edit question
Solved by:
Eliah Kagan
Solved:
Last query:
Last reply:
Revision history for this message
Best Eliah Kagan (degeneracypressure) said :
#1

Most users are best off simply installing packages they find they need. You can produce a list of names of all installed packages on the 10.04 LTS system and then attempt to install those packages on the Ubuntu 11.04 system, but you will almost certainly get errors which you would have to resolve by deciding between different packages, and your system may function differently from the way you want, with so many additional packages installed.

With that said, you can create a file called packages.txt on the desktop by opening a Terminal window and running this command:

dpkg-query -f='${Package}\n' -W > ~/Desktop/packages.txt

(I recommend copying and pasting that command, to avoid typos.)

You can run that command on the Ubuntu 10.04 LTS machine, then move the file over to the Ubuntu 11.04 machine. Assuming the file is now on the desktop of the 11.04 machine, you can attempt to install all the packages by running:

sudo apt-get update; sudo apt-get install $(cat ~/Desktop/packages.txt)

Or run a simulation to see whether or not they will be installable and what the effects are (in terms of other packages that have to be installed, upgraded, or removed):

sudo apt-get update; apt-get -s install $(cat ~/Desktop/packages.txt)

As I said above, this will probably fail, and then you can make modifications to packages.txt and try again.

You may want to prune through the file beforehand and remove packages you know you do not need or aren't available. At the very least, you can remove packages that start with openoffice.org, since OpenOffice.org is replaced with LibreOffice in Ubuntu 11.04.

Most libraries are installed because they are needed by applications. If you just install application packages, you might avoid installing libraries that are no longer needed or no longer available on the newer operating system. (Installing the newer versions of the application packages will cause whatever libraries they depend on to be installed as well.) Since most library packages start with lib and only a few application packages start with lib, you can produce a list that contains most application packages and does not contain most library packages by running:

dpkg-query -f='${Package}\n' -W | grep -v ^lib > ~/Desktop/packages.txt

Alternatively, if you already have a complete list of library packages on the newer machine's desktop and you want to attempt to install just packages whose names don't start with lib, you can run:

sudo apt-get update; sudo apt-get install $(grep -v ^lib ~/Desktop/packages.txt)

Or run the corresponding simulation:

sudo apt-get update; apt-get -s install $(grep -v ^lib ~/Desktop/packages.txt)

You'll notice that I've begun all the commands that perform or simulate installations with "sudo apt-get update;". That updates your package information so you're downloading current packages. If you've run it recently (like in the past hour or so), you don't have to run it again, so you can leave it off of subsequent invocations. If you ever want to run it by itself, then the trailing semicolon can be omitted (and good style suggests it should).

But again, I underscore that you are probably best off simply installing packages when you find that you need them. The actual package files from your 10.04 LTS system are not appropriate for your 11.04 system, both because they are different versions of Ubuntu and thus the packages are available in different versions and rely on different and potentially incompatible versions of core system libraries (like libc6), and also because your two systems have different architectures (i386 and amd64). Therefore, you cannot avoid downloading package content by any process of importing packages from the 10.04 LTS system.

To copy commands in this post to the clipboard for pasting into a Terminal, you may need to come to https://answers.launchpad.net/ubuntu/+question/165507, as they may be incorrectly split into multiple lines in your email.

Revision history for this message
Eliah Kagan (degeneracypressure) said :
#2

"Also, I like the 10.04 LTS desktop better than the 11.04 amd64 desktop."

On an Ubuntu 11.04 system, you can switch back from the Unity interface (with a single panel at the top of the screen containing no menus and a hideable launcher on the left side of the screen) to the classic interface (with a top panel that includes application menus, a bottom panel containing a window list and workspace switcher, and no launcher) resembling Ubuntu 10.04 LTS's interface by changing your session type from "Ubuntu" to "Ubuntu Classic" or "Ubuntu Classic (no effects)".

You can change this on the login screen, after you specify your username, as you are being prompted for your password. The drop-down menu for session type appears in the horizontal bar at the bottom of the graphical login screen.

Revision history for this message
tomdean (tomdean) said :
#3

Thanks Eliah Kagan, that solved my question.