Accidentally added architecture 1386 instead of i386

When installing wine on my Ubuntu machine, I made a small typo when allowing for 32-bit and 64-bit systems. I accidentally typed sudo dpkg --add-architecture 1386 instead of i386.

Now, when I try to sudo apt-get update or install any new software, I eventually get (among others) two noticeable error messages. The first is:

404 IP [some strange number, not my IP address] not found

The second error message ends with:

architecture 1386 not supported

I believe this is a result of the typo that I made using the dpkg command. How can I undo this?

Thank you very much.


Solution 1:

You can just undo --add-architecture with --remove-architecture.

Dpkg maintains a list of architectures it is supposed to track, apt consumes this list and tries to fetch package lists for each of them.