Arch Linux is still my favorite Linux distro for desktop use and once you get it
set up (which may take you a few tries, if it’s your first foray) it tends to be
pretty solid. That is, until you start seeing 404 error messages when you run
yay, or whatever your package manager du jour is.
These errors start to show up when you’re using a mirror that had went dark
or is experiencing some intermittent issues.
Like all things Arch, there’s a package that can help you with this situation.
reflector and makes it extremely easy to update your mirror list.
It even has a
systemd script that can be setup to run automatically and keep
your mirror list up to date with the fastest servers based on your location.
To get started, you need to install the
Once installed, you may want to update the configuration to only use mirrors
from your country. First, you’ll want to check the list of available countries:
I’m based in the US, so I want to use the
United States mirrors. Once you know which country or countries you want to use, open the configuration file:
And add the line:
If so inclined, you can adjust any of the other configuration options as you see
fit. Aside from adding in my country, I haven’t had any need to update anything
With everything configured, all we need to do is to enable and start the
reflector.timer services. The
reflector.service will update your mirror list on boot and gets triggered by the
reflector.timer automatically, once per week.
If you’re ever in the position that you need to update your mirror list right
this moment, you can run the
reflector.service to do so:
To check that things have run correctly, you can check out your
file which will have the date/time (in UTC) of the last time the file was generated: