How to disable multiarch support?

66,921

Solution 1

Since 12.10

dpkg --remove-architecture i386

to get rid of multiarch on an amd64 installation. In case you will have message, like:

dpkg: error: cannot remove architecture 'i386' currently in use by the database

you should remove all i386 packages before:

dpkg -l | grep i386

Solution 2

11.10 & 12.04

Multiarch support is enabled by the file /etc/dpkg/dpkg.cfg.d/multiarch

If you rename this file and run an update in a terminal you will notice that the i386 repo's are no longer visible.

Thus

sudo mv /etc/dpkg/dpkg.cfg.d/multiarch /etc/dpkg/dpkg.cfg.d/multiarch.backup

Solution 3

Based on both Ben's answer and user41220's answer I did the following:

sudo apt-get remove --purge `dpkg --get-selections | grep i386 | awk '{print $1}'`

Then

sudo dpkg --remove-architecture i386

and that worked just fine for me.

Solution 4

First of all, remove all i386-packages like so:

sudo apt-get remove --purge `dpkg --get-selections | grep i386 | awk '{print $1}'`

Please note: Skype, Steam, teamviewer etc. might be purged as well.

Then proceed with fossfreedoms advices.

Solution 5

Simpler alternative to remove all packages of that architecture before removing it (source; apt man page):

sudo apt purge .*:i386

If necessary (check with dpkg --print-foreign-architectures) you can remove the architecture from dpkg:

sudo dpkg --remove-architecture i386
Share:
66,921
Admin
Author by

Admin

Updated on September 18, 2022

Comments

  • Admin
    Admin over 1 year

    I don't want to install any i386 package. Is there any way to disable functionality?

  • johnvuong1999
    johnvuong1999 over 10 years
    With the regex feature of apt-get, you can apt-get remove .*:i386
  • Patrick
    Patrick over 10 years
    I see no additional information than existing answers.
  • Matthias P.
    Matthias P. about 10 years
    or: sudo aptitude purge '~i ~ri386'
  • Benjamin Marwell
    Benjamin Marwell almost 4 years
    This is true for more recent oses. If you put this in as an answer, I'd vote for it (for its simplicity).