Raspbian Buster – fixing “The repository ‘http://raspbian.raspberrypi.org/raspbian buster Release’ no longer has a Release file”

I have a number of Raspberry Pis that I tinker with every now and then, but not on a regular basis. On my Pi400 I have Rasbian Buster. I just tried a ‘sudo apt update’ and got this error:

E: The repository 'http://raspbian.raspberrypi.org/raspbian buster Release' no longer has a Release file.

From this post, apparently the apt repos for Buster have changed, so you need to edit /etc/apt/sources.list.d/raspi/list and replace

deb http://archive.raspberrypi.org/debian/ buster main

with

deb https://legacy.raspbian.org/raspbian/ buster main contrib non-free rpi

apt update again and all should be good.