Fix: Raspberry Pi OS – Failed to fetch http…

In this article I will describe step by step what to do when you try to update the Raspberry Pi’s operating system and get the following error:
Failed to fetch http://archive.raspberrypi.org/debian/….

First, open the terminal and type the following command:

sudo nano /etc/apt/sources.list

and then press ENTER

Now we need to change the URL to https, so replace the line:
http://raspbian.raspberrypi.org/raspbian/ bullseye main contrib non-free rpi
with
https://raspbian.raspberrypi.org/raspbian/ bullseye main contrib non-free rpi

press Ctrl+X to stop editing the file, Y to confirm the file name and ENTER to confirm saving.

Now restart the Raspberry Pi with the following command

sudo reboot now

Once the Raspberry Pi has restarted, open a terminal session again and try running the update commands once more

sudo apt update && sudo apt upgrade -y

Enjoy!

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top