After migrating to another datacenter, apt still uses the old mirrors.

September 17, 2016 113 views
Linux Basics Ubuntu 16.04

After migrating my NYC2 server to NYC1, apt is still using the NYC2 mirrors (apt update shows that). I took a look in /etc/apt/sources.list, but it doesn't mention NYC2, just the generic mirrors domain.

How can I update apt to use the NYC1 mirrors?

1 Answer

No, it is not using old mirrors.
I have the same behaviour on droplet created from start in NYC1.
I think I have explanation of this, but as far as I'm not DigitalOcean mod, take it with grain of salt.

It is using generic mirror. Generic mirror is behind some type of Load Balancer who will redirect you to less loaded mirror. It doesn't take in account your datacenter, it looks for server geolocation and which is less loaded. As far as both are in NYC, it can use any NYC mirror, usually one which is less-loaded to deliver your content on fastest possible way.
This is only what can I think of now. I would like to hear official response, or you can contact support for more details.

  • When you created it in NYC1, was it using the NYC1 mirrors?

    • I didn't paid attention to it but usually it is using, yet sometimes
      This is output of NYC1 droplet when running apt-get update.

      root@ubuntu-512mb-nyc1-01:~# apt-get update
      Hit:1 xenial-security InRelease
      Hit:2 xenial InRelease                     
      Hit:3 xenial-updates InRelease
      Hit:4 xenial-backports InRelease
      Reading package lists... Done
Have another answer? Share your knowledge.