Err:6 https://mirror.hetzner.com/ubuntu/packages jammy-updates/main arm64 Packages 404 Not Found [IP: 2a01:4ff:ff00::3:3 443]

apt update & apt upgrade not working anymore on a Hetzer ARM VM?

Here’s the solution.

Problem

I recently couldn’t update my jammy ARM VM on Hetzner. The reason is that Hetzner used to mirror Ubuntu package builds for ARM but for some reason stopped doing so. Hence, your system will receive 404 errors if you try.

I really don’t understand why there is no fallback as this concerns ALL Hetzner ARM VMs. So probably there are thousands of people with the same issue at this very moment.

Solution

Simply change the mirrors.

  1. Navigate to cd /etc/apt
  2. Move the sources list somewhere else as backup mv sources.list /root/ (you could also delete it, but better be safe than sorry)
  3. Under /etc/apt/sources.list.d create ubuntu.sources file with following content if you’re on jammy. Else adapt to your distro.
1
2
3
4
5
Types: deb
URIs: http://ports.ubuntu.com/
Suites: jammy jammy-updates jammy-backports jammy-security
Components: main restricted universe multiverse
Signed-By: /usr/share/keyrings/ubuntu-archive-keyring.gpg
  1. Re-run apt update & apt upgrade. It should work now.

Credits for the solution go entirely to Peter, thanks!