-
Notifications
You must be signed in to change notification settings - Fork 0
Update mirrors
This guide overviews the definitions of mirrors, mirrorlists, possible errors, and how to maintain up-to-date mirrors.
Mirrors are servers located around the world that store copies of software packages. When upgrading packages, your EndeavourOS system utilizes multiple mirrors, which are noted in a mirrorlist.
A well-maintained mirrorlist ensures that the pacman package manager can access the most up-to-date package files when performing system updates. Outdated mirrors can prevent pacman from updating applications, including the system's core packages.
To update a mirrorlist configuration, users should run commands to re-rank mirrors.
Important
It is highly recommended to re-rank mirrors at least every 1-2 months.
Arch packages are updated on a frequent and unscheduled rolling-release basis. Your Arch mirrorlist configuration should be updated regularly so your system can access up-to-date package databases.
-
Update the Arch
mirrorlistby running the command:$ reflector-simple
-
By default,
reflector-simpleselects the 20 fastest mirrors based on your set location. You can adjust these preferences in the GUI tool.
- The
reflector-simpleGUI tool allows easy customization of mirror locations, the number of mirrors stored, and ranking priority (latest, fastest, etc.)
- The
-
Hit OK to confirm the selection and run the process. It is normal to see warnings as
reflectortests various mirrors for connectivity speed and age. -
The system will notify you once the new Arch
mirrorlisthas been generated. Save to apply the configuration changes.
-
Refresh the system to sync the newly obtained mirrors with the Arch package databases:
$ yay -Syyu
Caution
Do not run yay with root permissions (sudo), or it may cause accidental (and potentially fatal) system changes. The AUR helper does not require root permissions to manage packages.
Endeavour OS has its own distro-unique packages, which are modified/additional versions distinct from Arch packages.
-
Update the Endeavour OS
mirrorlistwith:$ eos-rankmirrors
-
The
eos-rankmirrorsprocess only shows terminal output (no GUI tool). -
The terminal may display errors/warnings as the system tests various mirrors for connectivity and speed. It may take a few minutes to find the requisite amount of mirrors.

-
By default, the new
mirrorlistcontains the 20 fastest mirrors, which are listed with the original list for comparison. -
To confirm and save the changes, enter your system's root password.

-
If you do NOT wish to make the
mirrorlistchanges, stop the terminal process. By default, this shortcut is bound toCtrl+Cin the terminal. -
After confirming any mirrorlist changes, refresh the system with:
$ yay -Syyu
Caution
Do not run yay with root permissions (sudo), or it may cause accidental (and potentially fatal) system changes. This AUR helper does not require root permissions to manage packages.
When pacman receives a command to update packages and refresh the system, it attempts to connect to the package databases stored in mirrors. Outdated mirrors can prevent pacman from updating your system to the newest packages.
Common error or warning messages include:
| Terminal message | Issue |
|---|---|
GPGME error: No data |
Files from the package database are outdated or corrupt |
failed to synchronize all databases (invalid or corrupted database (PGP signature)) |
Outdated mirrors - not in sync with package databases |
failed retrieving file 'package-version.pkg' from arch.mirror.mx : The requested URL returned error: 404 |
Mirror cannot be reached, or package files are not available |
failed to commit transaction (failed to retrieve some files) |
Mirror cannot be reached, or package files are not available |
warning: too many errors from arch.mirror.mx, skipping for the remainder of this transaction |
Slow/unstable mirror connection (timed out) or network issues |
If pacman runs into these errors during a system update, be sure to re-rank mirrors before another update attempt.
Warning
If these errors/warnings persist despite re-reranking mirrors, this may indicate outdated AUR packages and require updating with yay.
Useful links:
When the user enters sudo pacman -Syu into a terminal, the pacman package manager begins the process to sync (-S), refresh (-y), and update (-u) the system.
-
pacmanattempts to connect and sync to Arch and EOS package databases. -
If successful,
pacmansearches for and detects new versions of packages/dependencies that are installed on your system. -
The terminal outputs a list of the updateable packages with a comparison of the old and new versions.
-
pacmanwaits for user permission to proceed with the update. If proceeding, user is required to enter the system's root password. -
After initiating the package(s) update,
pacmanretrieves new package files from the mirror. -
If
pacmansuccessfully retrieves package files, it installs them then deletes old versions.
GnuPG and GPGME are two tools are used to safely encrypt/decrypt the package files that pacman retrieves from package databases. If mirrors cannot access package databases (or are out of sync), you may see GPGME or PGP related errors.
-
The GPGME (or GnuPG Made Easy) library provides applications easier access to GnuPG functions.
-
GnuPG is a command-line interface (CLI) tool and universal crypto engine. It is often used as the crypto backend for applications.
Endeavour OS uses reflector-simple, which provides a GUI tool for reflector options. The same effect can be achieved with just a terminal command.
To update to and save the latest 20 mirrors sorted by speed, enter:
$ reflector --latest 20 --sort rate --save /etc/pacman.d/mirrorlistThis process will:
-
Retrieve the latest mirrorlist from the Arch mirror status page.
-
Filter/rank the mirrors by speed (until it has found 20, or a user-specified amount).
-
Saves and overwrites the current
/etc/pacman.d/mirrorlistconfig file.
Note
Refer to the reflector manpage documentation for usage details.
Popular alternatives to mirror management are listed on the Arch mirrors wiki. Some programs can automate mirror management when configured properly.
One such example is ghostmirror, which:
-
Checks that mirrors are synchronized.
-
Performs download speed tests on top of the usual ping test.
-
Automates the process via
systemd.
Note
See: ghostmirrorAUR, ghostmirror wiki