sudo reflector --save /etc/pacman.d/mirrorlist --protocol https --country Germany --latest 5 --sort age --fastest 5
Or:
I’ve installed pacman-contrib and use this script to update the mirrorlist:
#!/bin/sh
echo -n "Enter country code (in CAPITAL LETTERS): "
read COUNTRY
curl -s "https://archlinux.org/mirrorlist/?country=$COUNTRY&protocol=https&use_mirror_status=on" | sed -e 's/^#Server/Server/' -e '/^#/d' | rankmirrors -n 10 - | sudo tee /etc/pacman.d/mirrorlist