pacman: difference between sync, local, package and files databases

man pactree says:

-s, –sync

Read package data from sync databases instead of local database.

What is the difference between the two, and when would I prefer to use one over the other?

man pacman also mentions:

  • package database
  • files database

How do these fit into the picture?

Here is Solutions:

We have many solutions to this problem, But we recommend you to use the first solution because it is tested & true solution that will 100% work for you.

Solution 1

The local database is the list of all installed packages, the sync database is the list of all possible packages (determined by the repositories enabed in /etc/pacman.conf).

So, you would pass the -s switch to pactree if you wanted to see the dependency tree for an uninstalled package.

The files database is pacman’s native replacement for the pkgfile utility; it lets you reverse search for the name of the package that owns a particular file. Both tools require that you update the files database for an accurate result. See man pacman:

-F, –files
Query the files database. This operation allows you to look for packages owning certain files or display files owned by certain packages. Only
packages that are part of your sync databases are searched. See File Options below.

Note: Use and implement solution 1 because this method fully tested our system.
Thank you 🙂

All methods was sourced from or, is licensed under cc by-sa 2.5, cc by-sa 3.0 and cc by-sa 4.0

Leave a Reply