User avatar
RamaSpaceShip
Posts: 60
Joined: Sun Apr 26, 2020 12:19 pm

How to avoid random mirror on apt update/upgrade

Tue Apr 28, 2020 11:20 am

Hi,

I need to update/upgrade Raspbian on some Pis behind a firewall and I need to tell the network admin which servers and mirror will be used for that purpose.
I see that the mirror is not always the same, which causes trouble.

How should I modify the apt source.list file to use a single dedicated mirror (say http://ftp.igh.cnrs.fr) in addition (if still needed) to http://raspbian.raspberrypi.org and https://archive.raspberrypi.org, but no other?

My current apt source.list file contains:
deb http://raspbian.raspberrypi.org/raspbian/ buster main contrib non-free rpi
deb https://archive.raspberrypi.org/debian/ buster main ui

Thanks in advance for the answer

DirkS
Posts: 10363
Joined: Tue Jun 19, 2012 9:46 pm
Location: Essex, UK

Re: How to avoid random mirror on apt update/upgrade

Tue Apr 28, 2020 12:47 pm

Replace http://raspbian.raspberrypi.org/raspbian/ with one of the entries listed at https://www.raspbian.org/RaspbianMirrors
AFAIK there are no mirrors used for the RPF repo.

User avatar
RamaSpaceShip
Posts: 60
Joined: Sun Apr 26, 2020 12:19 pm

Re: How to avoid random mirror on apt update/upgrade

Tue Apr 28, 2020 3:02 pm

@DirkS
Thanks. It works!

User avatar
ksharindam
Posts: 163
Joined: Sat Jan 09, 2016 4:16 pm

Re: How to avoid random mirror on apt update/upgrade

Tue Apr 28, 2020 6:50 pm

Wow !
I was about to post a question why my "sudo apt update" speed is only 2kB/s. But saw this post, changed repo with a mirror, and problem solved.

Return to “Raspberry Pi OS”