how to remove a foreign architecture?

8,227

Solution 1

It appears that tumbleweed's comment solved your issue.

You can add an option to the Apt sources definition that restricts the architectures of that source:

deb [arch=amd64] ...

For more information see the Community Wiki page on multi-architecture package management.

Solution 2

The standard way to remove an architecture would be through dpkg:

sudo dpkg --remove-architecture i386

Tested on Ubuntu 16.0.4 LTS.

It is also faster & simpler than to add architecture after every deb ... in sources.list.

Share:
8,227

Related videos on Youtube

Amos Shapira
Author by

Amos Shapira

Updated on September 18, 2022

Comments

  • Amos Shapira
    Amos Shapira over 1 year

    On Ubuntu 12.04 LTS x64, we'd like to remove the i386 foreign architecture it comes with, but I don't see a dpkg command to do this cleanly.

    In Stuck with foreign-architecture=i386 when using apt-get, the user is advised to just remove the line from /etc/dpkg/dpkg.cfg.d/multiarch, I can do that (or even remove that file altogether), but I was wondering whether there is a more "appropriate" way to do that.

    The reason we want to do that is that we maintain a large number of continuous integration agents using Puppet and want to stick to "pure 64". We install our own Debian packages from our own maintained repository and this fails unless we provide an i386 version of the package. I'm aware that it's possible to override the architecture in the specific repository configuration but it'll be cleaner to just disable the non-64 architecture altogether.

    • tumbleweed
      tumbleweed about 11 years
      I don't understand why you have to provide i386 versions of your packages. On an amd64 machine, the installability of any i386 packages shouldn't be matter, unless you specifically install i386 packages.
    • Amos Shapira
      Amos Shapira about 11 years
      What we found is that "apt-get update" fails when our internal repo is configured since it looks for i386 packages which don't exist.
    • tumbleweed
      tumbleweed about 11 years
      You could add an empty i386 architecture to the repo. Or you could put deb [arch=amd64] ... in the sources.list
  • Amos Shapira
    Amos Shapira over 6 years
    Thanks. This sounds like the kind of answer I was after. Perhaps it was added in the 4+ years since I asked this question.