Skip to content

Instantly share code, notes, and snippets.

@AdrianoPereira
Created October 16, 2024 14:53
Show Gist options
  • Select an option

  • Save AdrianoPereira/3e3399c88f346a1b98fa8e69c2df864d to your computer and use it in GitHub Desktop.

Select an option

Save AdrianoPereira/3e3399c88f346a1b98fa8e69c2df864d to your computer and use it in GitHub Desktop.
Update Pacman Mirrors

Updating Pacman Mirrors

To ensure that you are using the fastest and most up-to-date mirrors for Pacman, follow these steps:

Step 1: Install pacman-mirrors (if necessary)

First, ensure that you have the pacman-mirrors package installed. You can install it using:

sudo pacman -S pacman-mirrors

Step 2: Update the Mirror List

Run the following command to update the mirror list and use the fastest available mirrors:

sudo pacman-mirrors --fasttrack

This command will generate a list of the fastest mirrors available based on your location.

Step 3: Synchronize and Update the System

After updating the mirrors, synchronize the package database and update the system by running:

sudo pacman -Syyu

The -Syyu option forces the synchronization of the package database with the newly updated mirrors and upgrades all installed packages to their latest versions.

Step 4: Verify Mirror List (Optional)

If you want to manually inspect the updated list of mirrors, you can check the following file:

cat /etc/pacman.d/mirrorlist

This file contains the list of mirrors currently being used by Pacman, ordered by priority.

Notes

  • Running sudo pacman-mirrors --fasttrack automatically selects the fastest mirrors for you. If you prefer to customize your mirror list, you can edit the /etc/pacman.d/mirrorlist file manually.
  • Use -Syyu after updating the mirrors to ensure you are syncing with the latest databases.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment