Resolving Raspberry pi architecture conflicts when running apt-get update

The 32bit version of Raspberry pi OS has an architecture of armv7l.

The 64 bit version of raspberry pi OS has an architecture of arm64.

There may be circumstances where your system has 64 bit software included (maybe some driver compilation support). If you constrain your apt repositories to 32 bit sources, you will run an apt-get update one day and see an error that says:

Skipping acquire of configured file 'main/binary-arm64/Packages' as repository 'http://aptcache-ng.local:3142/raspbian.raspberrypi.org/raspbian bookworm InRelease' doesn't support architecture 'arm64'

This shouldn’t matter! I only want 32 bit software. Aren’t I running on 32 bit Raspberry pi os? Here’s how you can determine what’s deployed:

uname -a
Linux ansibledest 6.12.40-v7+ #1896 SMP Thu Jul 24 15:19:33 BST 2025 armv7l GNU/Linux

We’ve confirmed I’m running 32 bit raspbery pi os. Why is the system attempting to pull arm64 software updates if we’re armv7l?

Spoiler: It’s because of dpkg has support on your system for foreign-architectures, obviously:

dpkg --print-foreign-architectures
arm64

We had foreign-architecture support enabled. Some packages install 64 bit architectures (for compatibility reasons???)- and if your apt-get repository libraries intentionally avoid 64 bit, you’ll get errors that prevent updates. Annoying. ‘Premature’ optimization has consequences.

Removing foreign architecture support

Removing a foreign architecture is a two step operation. You’ll have to pull any 64 bit packages off the system and then disable foreign architecture support.

Step 1: Purge all arm64 software

sudo apt-get remove --purge <package-name>:arm64

Step2: Purge foreign architecture support:

sudo dpkg --remove-architecture arm64

Hope that helps someone!