Fork 0
Automatically fetch latest mirrors
Go to file
Tom Willemse 2f85ddb45d Fix badge in the README 2023-07-14 00:15:15 -07:00
.gitignore Ignore files generated by ‘makepkg’ 2022-06-18 21:34:47 -07:00
PKGBUILD Update checksums 2022-11-24 00:09:48 -08:00
README.org Fix badge in the README 2023-07-14 00:15:15 -07:00
config.sh Put default configuration in config.sh 2016-06-12 15:15:16 +02:00
update-mirrors Replace ‘-L’ with ‘--location’ 2022-06-18 21:01:20 -07:00
update-mirrors.hook Add pacman hook description 2016-10-10 13:17:33 +02:00



This is a simple utility for archlinux that keeps the mirror list up-to-date.

Whenever the pacman-mirrorlist updates it's always a pain to have to pick out which servers exactly you want. And the archlinux project provides a nice Pacman Mirrorlist Generator. This utility uses that generator to automatically update the mirror list every time pacman-mirrorlist is updated.


I've provided a PKGBUILD through which it can be installed:

makepkg -sic

It will install the executable, configuration file, and pacman hook into the proper locations so that after it will always be called automatically.

You can also install it by adding my repository:

  SigLevel = Optional TrustAll
  Server = https://ryuslash.org/repo/x86_64

And then run pacman -Sy update-mirrors to install it.

Note that my repository currently isn't signed, plus I'm just a random guy on the internet. I don't expect anyone to actually use this, but if you do, do so with caution and at your own risk.


There are a few configuration options. The configuration file etc/xdg/update-mirrors/config.sh is just a regular shell script sourced by the update-mirrors script.

A string. The base URL for archlinux's mirrorlist generator. You probably don't have to change this. Default: https://www.archlinux.org/mirrorslist.
An array of strings. Which countries you want to include mirrors from. You will probably want to change this. Default: BE, NL.
An array of strings. Which protocols to include. Available protocols are http and https. Default: http, https.
An array of numbers. Which IP versions to include in the mirrorlist. Available versions are 4 and 6. Default: 4.
The string “on” or empty. Turning this on will make the generator filter the list of mirrors by the mirror score from the Mirror Status page. Default: on
A string, a file path. Where to write the result to. You probably don't have to change this. Default: /etc/pacman.d/mirrorlist.