How to update mirrorlist in Manjaro
2020 April 05
ManjaroLinuxHow to update your mirrorlist in Manjaro
Sometimes you get an error message like the one below when you try and run pacman -Syu, updating software through the commandline. Or in my case yay -Syu.
error: failed retrieving file ‘XXXXX’ from XXXXXXX : Resolving timed out after 10521 milliseconds
This can happen if your mirrorlist that you have for where to get updates on your software is out of date. Not to worry, you can update the list with a few easy steps.
The list lives at /etc/pacman.d/mirrorlist in your system. And that is just a text file as so many others. You can show the contents of it by running
sudo pacman-mirrors
Now how to update it?
sudo pacman-mirrors —fasttrack && sudo pacman -Syyu
That first updates the list with sudo pacman-mirrors —fasttrack. Fasttrack means it will rank them for speed too for you so you get the fastest mirrors for your location. sudo pacman -Syyu updates your whole system to reflect the change and take into consideration the new mirrorlist. That is the extra ‘y’ in there. This is needed when you have updated the mirrorlist.
There are more information on this from manjaros own wiki.
Hope this is as useful for others as it was for me to find out.