Reflector is a Python script which can retrieve the latest mirror list from the Arch Linux Mirror Status page, filter the most up-to-date mirrors, sort them by speed and overwrite the file
Install the package.
- In the following examples,
/etc/pacman.d/mirrorlistwill be overwritten. Make a backup before proceeding.
- Make sure the resulting
/etc/pacman.d/mirrorlistdoes not contain entries that you consider untrustworthy before syncing or updating with pacman.
To see all of the available options, run the following command:
$ reflector --help
/etc/pacman.d/mirrorlist need to be run as root.
Reflector ships with a
reflector.service. The service will run reflector with the parameters specified in
/etc/xdg/reflector/reflector.conf. The default options in this file should serve as a good starting point and example.
For example, to select the 5 most up-to-date mirrors from France and Germany that support HTTPS and overwrite
--save /etc/pacman.d/mirrorlist --country France,Germany --protocol https --latest 5
reflector.servicedepends on a network wait service to be configured via network-online.target.
To refresh the mirrorlist ahead of schedule, start
is not updated regularly, invoking reflector only because some mirror in some part of the globe was added or removed is not relevant. Use instead the timer-based automation. If you do not want
mirrorlist.pacnew to be installed at all, use