Pamac "synchronizing package databases" takes unusually long

pamac commands take an unusually long time on Synchronizing package databases.... I’m not sure what has changed to trigger this issue. Could use some pointers on how to go about debugging and root causing this problem.

sudo pacman -Scc # is clearing the cache
sudo pacman-mirrors -f5 # checks for the 5 fastest mirrorservers avaiable, you can adjust the number for your needs, but 5-8 is a good choice

it’s always a good choice before updating and speeds up the procedure of updating with
sudo pacman -Syyu

Nope.

-f, --fasttrack [NUMBER]
Generates a random mirrorlist for the users current selected branch, mirrors are randomly selected from the users current mirror pool, either a custom pool or the default pool, the randomly selected mirrors are ranked by their current access time. The higher number the higher possibility of a fast mirror. If a number is given the resulting mirrorlist contains that number of servers.

It picks 5 random mirrors from your current mirror pool, it will rank these mirrors, true, but the command you gave will not select the 5 fastest mirror this is misinformation people spread on the forum since ages, but this is not how it works.

sudo pacman-mirrors -c Global will give you the “official” mirrors, hosted on CDNs so this should give you high speed mirrors.

//EDIT: example with my current mirror pool, and your command:

[omano@omano-nvme ~]$ sudo pacman-mirrors -f5 
::INFO Downloading mirrors from Manjaro
::INFO => Mirror pool: https://repo.manjaro.org/mirrors.json
::INFO => Mirror status: https://repo.manjaro.org/status.json
::INFO Using custom mirror file
::INFO Querying mirrors - This may take some time
  0.675 Global         : https://mirrors.manjaro.org/repo/
::INFO Writing mirror list
::Global          : https://mirrors.manjaro.org/repo/testing/$repo/$arch
::INFO Mirror list generated and saved to: /etc/pacman.d/mirrorlist

You can see it is using my custom mirror pool (only HTTPS on Global mirrors), it ranks the only mirror which corresponds to my mirror pool and is up to date currently on the Testing branch I am on. It did not rank the 5 fastest mirrors available, it ranked the only mirror in my current mirror pool available, up to date, and corresponding to my mirrors settings.

1 Like

touche i forgot the fasttrack-option that is needed

1 Like

Thanks for the responses. It appears to have been an issue with IPv6. Some other package managers like npm were also having HTTP connectivity issues which I tracked down to IPv6 using strace. Once I disabled IPv6 using NetworkManager it seemed to address the slowness with pamac as well.

1 Like