The one-off method is to use the âapi --url arguments. When the pamac-mirrorlist.timer triggers - the mirrorlist is reset.
You can create a custom mirrorpool with only one mirror using the -i/âinteractive argument, then select the desired mirror. The choice will never change - unless you reset the custom mirrorpool.
Finally you can become your own mirror provider by setting a static mirror in pacman-mirrors.conf.
Each method has proâs and conâs - you will have to weigh the options an decide what serves your system best.
when posting the output of pacman-mirrors inside a code block (the set of 2x3 backticks) it looks like
```
$ sudo pacman-mirrors -c de
::INFO Downloading mirrors from Manjaro
::INFO => Mirror pool: https://repo.manjaro.org/mirrors.json
::INFO => Mirror status: https://repo.manjaro.org/status.json
::INFO User generated mirror list
::------------------------------------------------------------
::INFO Custom mirror file saved: /var/lib/pacman-mirrors/custom-mirrors.json
::INFO Using custom mirror file
::INFO Querying mirrors - This may take some time
0.172 Germany : https://mirror.alpix.eu/manjaro/
0.121 Germany : https://manjaro.kurdy.org/
::INFO Writing mirror list
::Germany : https://manjaro.kurdy.org/unstable/$repo/$arch
::Germany : https://mirror.alpix.eu/manjaro/unstable/$repo/$arch
::INFO Mirror list generated and saved to: /etc/pacman.d/mirrorlist
::INFO To reset custom mirrorlist 'sudo pacman-mirrors -id'
::INFO To remove custom config run 'sudo pacman-mirrors -c all'
```
There is more to it - please see the documentation - to learn how pacman-mirrors can use arguments and filters to create a mirrorpool and subsequently the mirrorlist.
##
## Manjaro Linux default mirrorlist
## Generated on 2023-05-22 16:47
##
## Please use 'pacman-mirrors -f [NUMBER] [NUMBER]' to modify mirrorlist
## (Use 0 for all mirrors)
##
#Country : Germany
Server = https://mirrors2.manjaro.org/stable/$repo/$arch
## Country : Germany
Server = https://mirror.alpix.eu/manjaro/stable/$repo/$arch
That means that Germany was the fastest only when you performed that command. That can change at any time, and another mirror might then be the fastest next time you use the command.
Choosing a specific mirror will not necessarily be the best course of action.
The command creates a custom mirror pool - limited to the servers selected - but pamac-mirrorlist.timer will still shuffle the pool and write a new list when triggered.
a mirror pool is not the same as a mirror list
The mirror list contains elements from the pool depending on the sync status for the system branch.
The mirror list may be identical to the pool if the pool only contains one mirror.
Locate a mirror which provides reliable timely sync and use that single mirror.
unsupported
There is other methods - I wonât recommend using those unless you have read the pacman manual and documentation.
You are the system admin - and thus realize your fellow forum mebers cannot help you when you run into issues - as a suggestion to refresh the mirrorlist will have no effect when you change the default configuration in such manner.
Part of /etc/pacman.conf
[...]
#
# REPOSITORIES
# - can be defined here or included from another file
# - pacman will search repositories in the order defined here
# - local/custom mirrors can be added here or in separate files
# - repositories listed first will take precedence when packages
# have identical names, regardless of version number
# - URLs will have $repo replaced by the name of the current repo
# - URLs will have $arch replaced by the name of the architecture
#
# Repository entries are of the format:
# [repo-name]
# Server = ServerName
# Include = IncludePath
#
# The header [repo-name] is crucial - it must be present and
# uncommented to enable the repo.
#
[core]
Include = /etc/pacman.d/mirrorlist
[...]
The comments indicates that you can provide a specific mirrorlist e.g. /etc/pacman.d/my-mirrorlist.
[core]
#Include = /etc/pacman.d/mirrorlist
Include = /etc/pacman.d/my-mirrorlist
But if it runs every Thursday by default, wouldnât that be for a reason?
What is the downside to disabling it?
If the downside is significant, I could simply restore an archived copy of /etc/pacman.d/mirrorlist (the one with the mirrors I chose for myself) just before each Manjaro update?
pacman (alpm library) parses the mirrorlist from top to bottom.
This is a thought experiment - which assumes you are lazy an do not update your metadata.
Then you want to sync foo which is registered in your metadata as version 1.1-1.
pacman will attempt to download package foo-1.1-1.pkg.tar.zst from the first mirror in the list.
The first mirror in your list no longer provide foo-1.1-1.pkg.tar.zst because 10m ago it synced with the master repo and now provides foo-1.2-1.pkg.tar.zst thus you will receive a 404 File not found.
pacman moves on to the next mirror in the list until a mirror provides the requested package.
This behaviour causes a lot of noise on the forum when some does not update metadata before sync.
It is higly recommended to understand how requests for packages are processed by the system and unless you are very knowledgeable - and that includes how the system behaves when you are not in sync with your mirrors metadata.
So be very careful with you experiment with mirrorlists and mirrorpools - be very careful.
If you cannot recover from your experiment be sure to mention how your experiemented - as that alone may be the clue to recovery.
Itâs to try to prevent people having to do it manually (and asking how to do it). It actually only needs to be done now and again, I have it disabled and Iâve refreshed my mirrrorlist twice in 6+ months.
Iâve ended up with worse mirrors at least once (they were already slow, after a refresh even slower, another refresh fixed it), so doing it every week is not only unnecessary but on rare occasions it can also be counterproductive.
The downside is that you may have to refresh your mirrorlist manually (using pacman-mirrrors) now and again. When theyâre slow, or if a mirror stops being a mirror, etc.
Anyway you were talking about having a static mirrorlist, so not refreshing the mirrorlist at all. Or you can instead use a custom mirror pool, so that pacman-mirrors will only use the mirrors from that.