Difference between revisions of "Mirrors"

From ArchWiki
Jump to navigation Jump to search
m (Added Czech unofficial mirror)
Line 140: Line 140:
===Czech Republic===
*ftp://ftp.sh.cvut.cz/MIRRORS/arch - <sub>[http://ftp.sh.cvut.cz/MIRRORS/arch/ http]</sub>

Revision as of 15:32, 30 August 2010

This template has only maintenance purposes. For linking to local translations please use interlanguage links, see Help:i18n#Interlanguage links.

Local languages: Català – Dansk – English – Español – Esperanto – Hrvatski – Indonesia – Italiano – Lietuviškai – Magyar – Nederlands – Norsk Bokmål – Polski – Português – Slovenský – Česky – Ελληνικά – Български – Русский – Српски – Українська – עברית – العربية – ไทย – 日本語 – 正體中文 – 简体中文 – 한국어

External languages (all articles in these languages should be moved to the external wiki): Deutsch – Français – Română – Suomi – Svenska – Tiếng Việt – Türkçe – فارسی

Template:Article summary start Template:Article summary text Template:Article summary heading Template:Article summary wiki Template:Article summary wiki Template:Article summary end

This page is a guide to selecting and configuring your mirrors, and a listing of current available mirrors.

Enabling a specific mirror

To enable mirrors, open Template:Filename and locate your geographic region. Uncomment mirrors you would like to use.

Note: archlinux.org bandwidth is capped at 50KB/s


# Any
# Server = ftp://mirrors.kernel.org/archlinux/$repo/os/i686
Server = http://mirrors.kernel.org/archlinux/$repo/os/i686

See #Mirror status and #List by speed for tools that help choosing mirrors.

Tip: Uncomment 5 favorite mirrors and place them at the top of the mirrorlist file. That way it's easy to find them and move them around if the first mirror on the list has problems. It also makes merging mirrorlist updates easier.

It is also possible to specify mirrors in Template:Filename. For the [core] repository, the default setup is:

Include = /etc/pacman.d/mirrorlist

To use the HostEurope mirror as a default mirror, add it before the Template:Codeline line:

Server = ftp://ftp.hosteurope.de/mirror/ftp.archlinux.org/core/os/i686
Include = /etc/pacman.d/mirrorlist

pacman will now try to connect to this mirror first. Proceed to do the same for [testing], [extra], and [community], if applicable.

Note: If mirrors have been stated directly in Template:Filename, remember to use the same mirror for all repositories. Otherwise packages that are incompatible to each other may be installed, like kernel26 from [core] and an older kernel module from [extra].

Mirror status

Check the status of the Arch mirrors and how updated they are by visiting http://www.archlinux.de/?page=MirrorStatus.

Optionally install Template:Package Official, an utility that generates a mirrorlist using Mirrorcheck's list. reflector is available in the community repo.

# pacman -S reflector

Or manually check how up-to-date a mirror is by:

  1. picking a server and browsing to "extra/os/";
  2. accesing http://www.archlinux.org/ in another browser tab or window; and
  3. comparing the last-modified date of the Template:Filename directory on the mirror to the [extra] date on the homepage, in the Package Repositories box to the right.

Sorting mirrors

If not using reflector, which has the ability to sort mirrors by both how updated they are and their speed, follow this demonstration of manual mirror sorting.

List by speed

Don't forget to take full advantage of using the local fastest mirror, which can be determined via the included bash script, Template:Filename.

Note: As of pacman 3.4.0 rankmirrors is broken. The developers advise users to wait for the next release [1]

Use Template:Codeline to switch to the Template:Filename directory:

# cd /etc/pacman.d

Backup the existing Template:Filename:

# cp mirrorlist mirrorlist.backup

Edit Template:Filename and uncomment mirrors for testing with rankmirrors:

# nano mirrorlist.backup

Optionally run the following Template:Codeline line to uncomment every mirror:

# sed '/^#\S/ s|#||' -i mirrorlist.backup

Finally, rank the mirrors. Operand Template:Codeline means only output the 6 fastest mirrors:

# rankmirrors -n 6 mirrorlist.backup > mirrorlist

Force pacman to refresh the package lists
After creating/editing Template:Filename, (manually or by using Template:Codeline) issue the following command:

# pacman -Syy
Tip: Passing two Template:Codeline or Template:Codeline flags forces pacman to refresh all package lists even if they are considered to be up to date. Issuing Template:Codeline whenever changing to a new mirror is good practice and will avoid possible issues.

Combined listing by speed and status

It is not a good idea to just use the fastest mirrors, since the fastest mirrors might be out of date. The preferred way would be to use #List by speed, then sorting those 6 fastest mirrors by their #Mirror status.

Simply visit either one or both #Mirror status links and sort them by the ones that are more up to date. Move the more up to date mirrors to the top of Template:Filename and if the mirrors are way out of date simply don't use those; repeat the process leaving out the outdated mirrors. So this ends up with a total of 6 mirrors that are sorted by speed and status, leaving out outdated mirrors.

When having mirror issues the above should be repeated. Or repeat once in a while even if not having mirror problems, to keep Template:Filename up to date.

using reflector

You can obtain reflector from the community repository:

# pacman -S reflector

It's recommended to have a backup of the mirrorlist:

# mv /etc/pacman.d/mirrorlist{,backup}

You can use reflector like this to retrieve the latest mirrorlist from the MirrorStatus page, filter the 8 most up-to-date mirrors, sort them by speed and overwrite the file /etc/pacman.d/mirrorlist:

# reflector -l 8 -r -o /etc/pacman.d/mirrorlist

Official mirrors

The official Arch Linux mirror list is available from the Template:Package Official package. To get an even more up-to-date list of mirrors, use the Pacman Mirrorlist Generator page on the main site.

In the unlikely scenario that you are without any configured mirrors and pacman-mirrorlist is not installed:

# wget -O /etc/pacman.d/mirrorlist http://www.archlinux.org/mirrorlist/all/

Be sure to uncomment a preferred mirror as described above, then:

# pacman -Syy
# pacman -Sf pacman-mirrorlist

If you want your mirror to be added to the official list, file a feature request. In the meantime, add it to the #Unofficial mirrors list at the end of this page.

If you get an error stating that the $arch variable is used but not defined, add to your pacman.conf:

Architecture = x86_64

Unofficial mirrors

These mirrors are not listed in Template:Filename.






Czech Republic


Great Britain



New Zealand




South Africa


United States

IPv6-ready mirrors


Out-of-sync mirrors: corrupted packages/file not found

Issues regarding out-of-sync mirrors pointed out in this news post may have already been sorted out for most users, but in the event that problems of this nature present themselves again, simply try to see if the packages are present in the [testing] repository.

After having synced with Template:Codeline, use this command:

# pacman -Ud $(pacman -Sup | tail -n +2 | sed -e 's,/\(core\|extra\)/,/testing/,' \
                                              -e 's,/\(community\)/,/\1-testing/,')

Doing so could help in any occasion were packages in the mirror haven't been synced to [core/extra], and are still residing in [testing]. It is perfectly safe to install from [testing] in this case since the packages are being matched by version and release numbers.

In any event, it is best to switch mirrors and sync with Template:Codeline than resorting to an alternate repository. However, all or some of the mirrors may at times be out-of-sync to some degree.

Using all mirrors

To emulate Template:Codelines behavior of going through the entire mirror list, use this script: Template:File