Mixed architectures (arm64 + armhf) on Raspberry Pi 4 – is this expected?

Hello everyone,
I’m running a Raspberry Pi 4 with DietPi (Debian trixie, 64-bit / arm64), and I recently ran into issues with Node.js/npm.
While troubleshooting, I noticed that my system has both arm64 and armhf architectures enabled:

dpkg --print-architecture
dpkg --print-foreign-architectures

In addition, there are several :armhf packages installed, including essential libraries such as:

libc6:armhf
libgcc-s1:armhf

When I tried to remove them, apt correctly prevented it because they are marked as essential packages.
My questions:

  1. Is it normal/expected for DietPi to have both arm64 and armhf architectures enabled?
  2. Is there an official recommendation on whether armhf should be kept or removed?
  3. If cleanup is recommended: what is the safe way to do this without breaking the system?
  4. Can this multiarch setup cause issues with Node.js/npm (e.g. conflicts between apt packages and NodeSource installations)?

Background:
I encountered a broken npm installation (missing modules) and started investigating possible architecture conflicts.
Thanks in advance for your help!

That has nothing to do with DietPi. I don’t think you’re using a real 64-bit system. It’s probably a 32-bit image with a 32-bit userland and a kernel that’s being forced to run in 64-bit mode via a configuration parameter.

Unfortunately, you forgot to fill in the troubleshooting template and simply deleted it. Otherwise, we would already have a bit more information about your system. Could you please fill in the following?

Required

  • DietPi version | cat /boot/dietpi/.version
  • Distro version | echo $G_DISTRO_NAME $G_RASPBIAN
  • Kernel version | uname -a
  • Architecture | dpkg --print-architecture
  • SBC model | echo $G_HW_MODEL_NAME or (EG: RPi3)

And if it is indeed a real 64-bit image, you added the 32-bit architecture manually yourself.

Sorry forgot this

# cat /boot/dietpi/.version
G_DIETPI_VERSION_CORE=10
G_DIETPI_VERSION_SUB=2
G_DIETPI_VERSION_RC=3
G_GITBRANCH='master'
G_GITOWNER='MichaIng'

# echo $G_DISTRO_NAME $G_RASPBIAN
trixie 0

# uname -a
Linux smarthome 6.12.75+rpt-rpi-v8 #1 SMP PREEMPT Debian 1:6.12.75-1+rpt1
(2026-03-11) aarch64 GNU/Linux

# dpkg --print-architecture
arm64

 echo $G_HW_MODEL_NAME
RPi 4 Model B (aarch64)

I found hundreds of armhf packages installed including core components like apt and bash — is this expected or a broken system?

Can I remove the armhf and 32bit architecture or reinstall?