Skip to the content
pacman-master.com

pacman -Ss: searching for a package

To search the repositories, run pacman -Ss <pattern>. It matches the pattern against package names and descriptions, and it needs no root because it only reads the databases already on the machine.

pacman -Ss <pattern>
-S
--sync — install packages from the repositories and upgrade the system
-s
--search — search the repositories for packages matching the patterns

Runs without root.

What it does. Search the repositories for packages whose name or description matches the pattern.

Watch out. Read-only: searching needs no root, and none of the three search commands changes anything.

Searching for a file rather than a package is a fourth question with its own answers, laid out on the file ownership page.

Three searches that are easy to confuse

They answer different questions, which is why one of them keeps coming back empty for people expecting another:

CommandSearchesAnswers
pacman -Ss <pattern>The repository databasesWhat could I install that matches this?
pacman -Qs <pattern>The local databaseWhat have I already installed that matches this?
pacman -F <filename>The file databasesWhich package would give me this file?

Reading the output

Each hit is two lines: a header line and an indented description.

<repository>/<name> <version> [installed] <description>

The repository name in front tells you where it would come from. The [installed] marker only appears for packages already on the machine.

To get names only — for piping into something else — add q:

routinepacman -Ssq <pattern>

The pattern is a regular expression

The pattern is matched as a regular expression, not as a literal string, so anchors work and a stray dot matches any character:

PatternMatches
pacman -Ss ^vimNames and descriptions beginning with vim
pacman -Ss '^vim$'Exactly that word, quoted so the shell leaves it alone
pacman -Ss image viewerEntries matching both patterns, because several patterns narrow the result rather than widening it

-F: searching for a file, not a package

The file databases are separate from the package databases and are not downloaded by default, so the first -F search on a machine usually returns nothing until they are fetched:

routinesudo pacman -Fy

Downloads the file databases. Needs root because it writes them, but nothing is installed.

routinepacman -F <filename>

Once they are in place, -F answers the question that comes up whenever a script fails on a missing command: which package would provide it. For a file already on the machine, the question is the other way round and the answer is pacman -Qo.

Looking at one package in detail

CommandReadsWorks for
pacman -Si <package>The repository databaseAny package in the repositories, installed or not
pacman -Qi <package>The local databaseOnly packages already installed

Common questions

How do I search for a package in Arch?

Run pacman -Ss followed by a pattern. It searches the names and descriptions in the repository databases and prints each match as a header line and an indented description.

Why does pacman -F find nothing?

The file databases are separate and are not downloaded by default. Run sudo pacman -Fy once to fetch them, then -F searches work.

What is the difference between -Ss and -Qs?

-Ss searches the repositories, so it finds packages you could install. -Qs searches the local database, so it finds packages that are already installed.

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 .