# Adding/Removing a repo to ArchLinux

February 28, 2024 - Reading time: 2 minutes

Sometimes when you look for a package in https://archlinux.org/packages and try to install, it won't work. This is because you haven't yet added the ArchLinux Repository that contains the package you are trying to install.

Step 1

Open configuration file "/etc/pacman.conf" using editor "nano":

sudo nano /etc/pacman.conf

Step 2

add '#' from whatever repo you want to enable

remove '#' from whatever repo you want to disable

eg, if you want to add 'extra' repository, then make sure you have these lines (without a '#'):

[extra]

Include = etc/pacman.d/mirrorlist

or alternatively, to disable 'extra' repo, just add the comment sign '#' to these same lines, ie:

#[extra]

#Include = etc/pacman.d/mirrorlist

Step 3

save file by clicking CTRL+X , then 'Y' . Now you should have the desired repos available according to how you edited the files in step 2.

ABOUT

Welcome, I am GalacticKreplach. This is my documentation blog for guides, fixes, bugs and updates. Enjoy the content, comment and share your insights.

Hit Counter

24