sudo reflector -l 5 -r -o /etc/pacman.d/mirrorlist

archlinux: updates repository mirrors according to most up to date mirrors, then speed

Requires 'reflector' package from official repository. '5' in the example is the number of mirrors you want in the mirrorlist, could be other numbers of course.

2011-03-20 20:33:35

These Might Interest You

  • Shows which packages from the official repositories (not aur) have updates available. For most accurate output, the mirrors and package lists should be up to date.

    pacman -Qu
    ibnarrashid · 2011-03-20 20:23:49 0

  • 0
    sudo pacman-mirrors -g
    unixmonkey57489 · 2013-05-16 13:55:39 0
  • Add a repo to cobbler. To download all the repository contents the command is: cobbler reposync

    cobbler repo add --name=CentOS-5.3-i386-updates --mirror=
    w00binda · 2009-04-27 10:18:45 0
  • Need to find a Mageia Linux mirror server providing Mageia 4 via rsync? Modify the "url=" string for the version you want. This shows i586 which is the 32bit version. If you want the 64bit version it is: url=; wget -q ${url} -O - | grep rsync: Show Sample Output

    url=; wget -q ${url} -O - | grep rsync:
    mpb · 2013-05-20 16:19:05 0
  • Fix's centos 6.2 yum's error: could not get metalink error was 14: PYCURL ERROR 77 - "Problem with the SSL CA cert (path? access rights?)" Error: Cannot retrieve metalink for repository: epel-source. Please verify its path and try again

    curl -o /etc/pki/tls/certs/ca-bundle.crt
    mokico · 2013-02-10 18:06:20 0

  • 7
    lftp -ulogin,passwd -e "mirror --reverse /my/from/dir/ /ftp/target/dir/" ftp.server.xx
    cp · 2011-04-01 12:40:11 0

What do you think?

Any thoughts on this command? Does it work on your machine? Can you do the same thing with only 14 characters?

You must be signed in to comment.

What's this? is the place to record those command-line gems that you return to again and again. That way others can gain from your CLI wisdom and you from theirs too. All commands can be commented on, discussed and voted up or down.

Share Your Commands

Stay in the loop…

Follow the Tweets.

Every new command is wrapped in a tweet and posted to Twitter. Following the stream is a great way of staying abreast of the latest commands. For the more discerning, there are Twitter accounts for commands that get a minimum of 3 and 10 votes - that way only the great commands get tweeted.


Subscribe to the feeds.

Use your favourite RSS aggregator to stay in touch with the latest commands. There are feeds mirroring the 3 Twitter streams as well as for virtually every other subset (users, tags, functions,…):

Subscribe to the feed for: