Remove not installed packages and unused repositories from the cache (use two --clean flags to clean all packages)

pacman --sync

sudo pacman --sync --clean

click the source code to copy install pacman --sync on any operating system with command-not-found.com