Page 1 of 1

How to avoid random mirror on apt update/upgrade

Posted: Tue Apr 28, 2020 11:20 am
by RamaSpaceShip
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

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

Posted: Tue Apr 28, 2020 12:47 pm
by DirkS
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.

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

Posted: Tue Apr 28, 2020 3:02 pm
by RamaSpaceShip
@DirkS
Thanks. It works!

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

Posted: Tue Apr 28, 2020 6:50 pm
by ksharindam
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.