How to fix APT Skipping acquire of configured file ... doesn't support architecture i386

Problem

While running apt update, you see the following error message:

N: Skipping acquire of configured file 'universe/binary-i386/Packages' as repository 'https://josm.openstreetmap.de/apt noble InRelease' doesn't support architecture 'i386'

for one or more repositories.

Solution

Your package manager is configured to use both amd64 and i386 repositories. The repositories for which you see the warning message don’t support the i386 architecture and only provide packages for amd64.

In order to fix this, edit the file for the repository in /etc/apt/sources.list.d. The name of the file in that directory is user-defined, if you can’t find it, grep for the repository URL in the directory. For our example above:

grep -r "https://josm.openstreetmap.de/apt" /etc/apt/sources.list.d

The resulting output will tell you the correct file in the first column:

/etc/apt/sources.list.d/josm.list:deb [signed-by=/usr/local/share/keyrings/josm-apt.gpg] https://josm.openstreetmap.de/apt noble universe

In this case, the correct file is /etc/apt/sources.list.d/josm.list.

Now, open this file in an editor (as root!), e.g.

sudo nano /etc/apt/sources.list.d/josm.list

The file will look like this, with or without the [] section

deb [signed-by=/usr/local/share/keyrings/josm-apt.gpg] https://josm.openstreetmap.de/apt noble universe

Now, add arch=amd64 to the square brackets []. In case the square brackets are missing, add them directly after deb:

deb [arch=amd64 signed-by=/usr/local/share/keyrings/josm-apt.gpg] https://josm.openstreetmap.de/apt noble universe

The order does not matter, but the arch=amd64 must be inside the square brackets! What we just did is to tell APT to only use the amd64 architecture for this repository.

After that, save the file (Ctrl+O in nano) and exit the editor (Ctrl+X in nano).

Now you can run apt update again and the warning message should be gone - you might need to repeat this step for other repositories with the same warning, though.