Skip to the content
pacman-master.com

pacman error messages

pacman says what went wrong in one line and then stops. The reader below matches that line against the messages written up on this site and returns the entry for it, with the steps in the order they are worth trying.

pacman -Syu
-S
--sync — install packages from the repositories and upgrade the system
-y
--refresh — refresh the package databases from the mirrors
-u
--sysupgrade — upgrade every installed package that is out of date

Needs root.

What it does. Most messages here are answered by the upgrade that was skipped, which is why it is worth trying before anything is deleted.

Watch out. A message this reader has no entry for is refused rather than answered. The wording pacman printed is then the thing to search for.

Read a message

Try:

The messages it has entries for

Each row is the wording the reader matches on. A message that carries none of these is refused rather than answered.

EntryWhat it isWording it looks forPage
lockThe database is lockedunable to lock databasefailed to init transactiondb.lckDatabase lock
targetThe package name was not foundtarget not foundError messages
signatureA package signature was refusedsignature fromunknown trustinvalid or corrupted packageKeyring and signatures
conflict-fileA file on disk is in the wayconflicting filesexists in filesystemfailed to commit transactionError messages
depsA dependency could not be satisfiedcould not satisfy dependenciesfailed to prepare transactionbreaks dependencyPartial upgrades
mirrorA file could not be fetched from a mirrorfailed retrieving filethe requested url returned errorconnection timed outMirrorlist
rootThe command needs rootyou cannot perform this operation unless you are rootoperation not permittedpermission deniedError messages
pacnewA configuration file was installed alongside yoursinstalled as.pacnew.pacsave.pacnew and .pacsave
newerThe installed version is newer than the repositoryis newer thandowngradingGoing back a version
conflict-pkgTwo packages cannot both be installedunresolvable package conflictsare in conflictconflicts withError messages
uptodateNothing to do for that packageis up to date -- skippingthere is nothing to dois up to date -- reinstallingReinstalling

How to give it a useful line

  • Paste the line beginning error: or warning:, not the whole screen. Surrounding output does no harm, but the line that names the failure is the one that matches.
  • Capitalisation does not matter.
  • Package names and paths in the message are ignored, so the line can be pasted as it stands without editing anything out of it.

The entries in full

The same entries, written out, for reading without JavaScript and for linking to directly.

The database is locked

pacman found /var/lib/pacman/db.lck, the file it creates while a transaction is running, so it refused to start a second one.

Either another pacman is running right now, or one was interrupted and left the lock file behind.

  1. Look for a pacman that is still running. If one is, wait for it.
    not pacmanpgrep -a pacman
  2. If nothing is running, the lock file is stale and can be deleted.
    not pacmansudo rm /var/lib/pacman/db.lck
  3. Then run the command that was refused again.
    routinesudo pacman -Syu

More on this: Database lock

The package name was not found

The name given is not in any repository pacman holds a database for.

The name is spelled differently, the repository holding it is not enabled in pacman.conf, the databases have not been refreshed yet, or the package lives in the AUR and not in a repository at all.

  1. Search the repositories for the part of the name you are sure of.
    routinepacman -Ss firefox
  2. Refresh the databases and upgrade, then try the install again.
    routinesudo pacman -Syu
  3. If the search finds nothing, the package may be in the AUR, which pacman does not install from.

More on this: Error messages

A package signature was refused

pacman checked the signature on a downloaded package against the keys in /etc/pacman.d/gnupg and did not get an answer it accepts.

The local keyring is out of date or has not been filled in, the system clock is wrong so a key looks expired or not yet valid, or the download itself is damaged.

  1. Check the clock first: a date in the past or the future makes valid keys look invalid.
    not pacmantimedatectl
  2. Upgrade the keyring package, which is where the current keys come from. On its own that is the shape of a partial upgrade, so the full upgrade below has to follow it.
    riskysudo pacman -Sy archlinux-keyring
  3. If that is refused too, fill the keyring from the package already on disk.
    not pacmansudo pacman-key --populate archlinux
  4. Then refresh and upgrade in one command.
    routinesudo pacman -Syu

More on this: Keyring and signatures

A file on disk is in the way

A package wants to write a path that is already there and that the local database does not record as belonging to that package.

The file was put there by something other than pacman, or an earlier transaction was interrupted part way through.

  1. Ask which package owns the path pacman named.
    routinepacman -Qo /usr/bin/ls
  2. If no package owns it, the file arrived outside pacman; move it aside and run the install again.
  3. If a package does own it, that is a packaging conflict, and overwriting leaves the database describing a file that is no longer the one on disk.

More on this: Error messages

A dependency could not be satisfied

The transaction as asked for would leave a package needing a version of something that would not be installed.

Most often the databases are newer than the installed packages, which is what a bare -Sy leaves behind, or a name is being held back.

  1. Refresh and upgrade together, so the databases and the packages move at the same time.
    routinesudo pacman -Syu
  2. If a name is held back in pacman.conf, that is the version the rest of the system is being asked to live with.
  3. Read the dependency line pacman printed: it names the package that breaks and the version it wants.

More on this: Partial upgrades

A file could not be fetched from a mirror

pacman reached a mirror and did not get the file it asked for.

The mirror is out of date or being synchronised, it is unreachable, or the mirrorlist has no enabled server for that repository.

  1. Open the mirrorlist and check that at least one Server line is not commented out.
  2. Force a full re-download of the databases, which also gets past a database that was cached while broken.
    routinesudo pacman -Syyu
  3. If one mirror keeps failing, move another one above it in the list.

More on this: Mirrorlist

The command needs root

The command writes to the databases, the cache or the files a package owns, and the account running it may not write there.

The sudo prefix was left off a command that writes.

  1. Run the same command through sudo.
    routinesudo pacman -Syu
  2. Reading commands do not need it: the -Q queries, -Ss and -Si.
    routinepacman -Qs firefox

More on this: Error messages

A configuration file was installed alongside yours

The upgrade carried a new version of a configuration file you had edited, so pacman kept yours and wrote the new one next to it.

This is a notice, not a failure. Nothing was overwritten and nothing was lost; two files now sit side by side.

  1. Find the files waiting to be merged.
    not pacmanfind /etc -name "*.pacnew"
  2. Compare the new file with yours and carry across the parts you want.
    not pacmandiff /etc/pacman.conf /etc/pacman.conf.pacnew
  3. Delete the .pacnew once it has been merged, so the next one is easy to spot.

More on this: .pacnew and .pacsave

The installed version is newer than the repository

The version on the machine is ahead of the version the repository offers, so an upgrade would move it backwards.

A mirror is behind, the package came from somewhere other than the repository, or a doubled -u asked for the downgrade.

  1. Refresh the databases fully before deciding, in case the mirror was stale.
    routinesudo pacman -Syyu
  2. If the repository really is behind, waiting is the quiet option.

More on this: Going back a version

Two packages cannot both be installed

Two packages declare that they cannot be installed together, usually because they provide the same thing.

A package has been replaced by another one, or two providers of the same component are both being asked for.

  1. Read which two names pacman printed: one of them has to go.
  2. Ask what is installed that matches the older name.
    routinepacman -Qs firefox
  3. Remove the one being replaced, then install the new one.
    cautionsudo pacman -Rns firefox

More on this: Error messages

Nothing to do for that package

The version asked for is the version already installed, so pacman has no work to do.

This is a notice, not a failure.

  1. To put the same version back on disk anyway, ask for the install again without --needed.
    routinesudo pacman -S firefox
  2. To check the files of that package against the database instead, query them.
    routinepacman -Qk firefox

More on this: Reinstalling

Two things worth trying before anything else

A large share of what pacman refuses to do comes from one of two states: the databases and the packages have come apart, or the keys cannot check what was downloaded. Both have their own page, and both start with the same command.

routinesudo pacman -Syu

If it refuses to start because a lock is in the way, that is the database lock page. If it starts and then refuses the packages it downloaded, that is the keyring page.

Common questions

What does error: target not found mean in pacman?

The name given is not in any repository pacman holds a database for. The spelling may differ, the repository may not be enabled, the databases may not have been refreshed, or the package may be in the AUR rather than in a repository.

What does failed to commit transaction (conflicting files) mean?

A package wants to write a path that is already there and that the local database does not record as belonging to it. Asking pacman -Qo which package owns that path is the first step, because often nothing does.

Why does pacman say it cannot lock the database?

It found /var/lib/pacman/db.lck, the file it creates while a transaction runs. Either another pacman is running, or one was interrupted and left the file behind.

What should I do with a pacman error this page has no entry for?

Search for the wording pacman printed rather than for a paraphrase of it. The reader here refuses a message it has no entry for instead of returning the nearest one, because a wrong answer about a broken system costs more than none.

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 .