Skip to the content
pacman-master.com

/etc/pacman.conf and what is in it

Most of what the commands elsewhere on this site do is decided in one file. /etc/pacman.conf holds the general options in an [options] section and then one section per repository, in the order pacman should consult them.

pacman-conf

What it does. Print the configuration pacman is actually using, with the includes resolved, rather than reading the file and guessing.

Watch out. An option written under the wrong section heading is read as belonging to that section, which is how a repository option ends up doing nothing.

The shape of the file

[options] then one line per option; then [<repository>] with its own lines

The shape, not a working file. Order matters for the repository sections: the first one that carries a package is the one it comes from.

The repository sections are the reason two machines can be handed the same package name and get different files. The mirrorlist page covers the file those sections usually include.

Options people change

OptionWhat it doesWorth knowing
IgnorePkgKeeps named packages out of upgradesCovered on the holding a package back page; it is a partial upgrade you chose
CacheDirWhere downloaded package files are keptMoving it moves what the cache commands act on
ParallelDownloadsHow many package files are fetched at onceA number, not a switch; it changes the download and nothing about what is installed
ColorColours pacman's own outputA switch with no value after it, which is the shape several options here use
VerbosePkgListsPrints the transaction as a table with sizesMakes the list before the confirmation easier to read, which is the list worth reading
SigLevelHow strictly signatures are checkedThe one on the keyring page; loosening it to silence an error removes the check that was working
HoldPkgPackages pacman warns extra loudly about removingA warning, not a block: the removal still happens if you answer yes
NoExtractPaths a package is not allowed to writeRarely needed, and it makes the database describe files that are not on disk

Reading the configuration that is in force

The file can include others, so what is on screen is not necessarily what pacman uses. A separate program prints the resolved result:

not pacmanpacman-conf
not pacmanpacman-conf --repo-list

The repositories in the order pacman consults them, which is the order that decides where a package comes from.

This is not a pacman operation, which is why no level is given for it. It ships with pacman itself rather than with the contrib package.

When this file changes under you

An upgrade to pacman itself can carry a new pacman.conf. Because almost everyone has edited theirs, the new one arrives as a .pacnew:

warning: /etc/pacman.conf installed as /etc/pacman.conf.pacnew

That line is the one people most often skip, and pacman.conf is the file where skipping it costs most: a new option with a default that differs from the old behaviour changes what later commands do. The .pacnew page covers merging it.

Editing this file changes what pacman does on the next run and gives no feedback until then. Printing the resolved configuration after an edit is the cheapest way to find a line that landed under the wrong section heading.

Common questions

Where is the pacman configuration file?

At /etc/pacman.conf. It holds an [options] section for general settings and then one section per repository, in the order pacman consults them.

How do I enable a repository in pacman?

Uncomment or add its section in /etc/pacman.conf, then refresh the databases with an upgrade so that pacman has something to read for it. Order matters: the first repository carrying a package is the one it comes from.

What does pacman-conf do?

It prints the configuration pacman is actually using, with any included files resolved. That is different from reading pacman.conf by eye, which does not show what the includes brought in.

Why did my pacman.conf change get ignored?

The most common reason is that the line landed under a repository section instead of under [options], where it is read as belonging to that repository. Printing the resolved configuration shows where it ended up.

How to check this page

Two commands on your own machine: pacman -<operation> --help lists the modifiers that operation accepts, and man pacman opens the pacman(8) manual page these descriptions are written from. Where the descriptions come from, and what this site is not, is set out on the about page.

This page was last edited on .