pacman-mirrors
Manage pacman mirrorlist for faster downloads
TLDR
Generate a mirrorlist using the default settings
Get the status of the current mirrors
Display the current branch
Switch to a different branch
Generate a mirrorlist, only using mirrors in your country
SYNOPSIS
pacman-mirrors [options]
PARAMETERS
-h, --help
Displays the help message and exits.
-c <COUNTRY>, --country <COUNTRY>
Filters mirrors by specified country or countries (e.g., US, DE). Can be used multiple times.
-f <NUMBER>, --fasttrack <NUMBER>
Selects the <NUMBER> fastest mirrors after ranking them by speed.
-i, --interactive
Enables interactive mode, allowing manual selection of mirrors from a list.
-g, --generate
Generates the mirror list without performing any speed ranking.
-P <PROTOCOL>, --protocol <PROTOCOL>
Filters mirrors by specified protocol (e.g., https, http, ftp). Can be used multiple times.
-a, --api
Uses the official api.manjaro.org to retrieve the mirror list data.
-B <BRANCH>, --branch <BRANCH>
Specifies the Manjaro branch to use (stable, testing, or unstable).
-m <METHOD>, --method <METHOD>
Sets the ranking method for mirrors (e.g., rank for speed, random).
-o <FILE>, --outfile <FILE>
Writes the generated mirror list to a specified <FILE> instead of the default /etc/pacman.d/mirrorlist.
-v, --verbose
Enables verbose output, showing more details during execution.
-d, --default
Resets the mirror list to its default configuration.
-R, --no-rank
Instructs the command to not rank mirrors by speed, using the filtered list directly.
-U <URL>, --url <URL>
Uses a custom <URL> as the source for retrieving the mirror list.
DESCRIPTION
pacman-mirrors is a robust script exclusive to Manjaro Linux distributions, designed to streamline the management and optimization of the /etc/pacman.d/mirrorlist file. This file dictates which repositories pacman utilizes for software downloads. Instead of manual intervention, pacman-mirrors automates the generation of a new mirror list, often by ranking mirrors based on speed and availability. It supports filtering mirrors by geographic location (countries), communication protocol (e.g., https, http), and Manjaro's specific branches (stable, testing, unstable). This functionality ensures that pacman leverages fast and reliable mirrors, significantly enhancing update and package installation speeds. Following its execution, it is standard practice to run sudo pacman -Syy to refresh the local package database against the newly configured mirrors.
CAVEATS
The pacman-mirrors command typically requires sudo privileges to modify the system's /etc/pacman.d/mirrorlist file. It is a utility developed specifically for Manjaro Linux and its derivatives, and is not available on other distributions like vanilla Arch Linux or Debian-based systems.
POST-UPDATE ACTION
After running pacman-mirrors, it is essential to synchronize your local package database with the newly selected mirrors by executing sudo pacman -Syy. Failing to do so might result in package mismatches or update errors.
MANJARO SPECIFIC
It's important to note that pacman-mirrors is a Manjaro-specific utility. Users on other Linux distributions will not find this command or its equivalent functionality in their default package management tools.
HISTORY
pacman-mirrors was developed as a core utility for Manjaro Linux, addressing the need for a user-friendly and efficient mechanism to manage Pacman's mirror list. In a rolling release distribution like Manjaro, effective mirror management is crucial for system stability and update speed. Its creation aimed to simplify the process, moving beyond manual file editing and offering automated ranking and filtering capabilities, thus significantly enhancing the overall user experience on Manjaro.
SEE ALSO
pacman(8)