Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm looking for a package that provides a specific binary, so I can install it. how can I search to find out what packages provide this binary? (note: I know there's at least one tool that does this, but I have forgotten its name.)

share|improve this question
Also the binary I'm looking for is /usr/sbin/ipset if someone wanted to tip me off on what package provides it even though they don't know the answer to the question. – xenoterracide Jun 12 '11 at 14:59
Gilles answer is the correct one. Regarding ipset, I was only able to find it in AUR aur.archlinux.org/packages.php?ID=16553 – jasonwryan Jun 12 '11 at 18:46
up vote 35 down vote accepted

From the Pacman Rosetta, since you're looking for the equivalent to apt-file:

pkgfile filename

pkgfile used to be in the pkgtools package. In recent versions, it's in its own package. To install: pacman -S pkgfile

From pacman 5.0, there is builtin functionality for searching the database with the -F option.

pacman -Fo $filename

will print the package that owns $filename. This is marginally slower than pkgfile, but as it is a pacman function, it does not require that you periodically update the pkgfile database.

share|improve this answer

From ArchWiki:

$ pacman -Qo /path/to/file_name

You can to see more arguments in Querying package databases.

share|improve this answer
That only tells you what package owns a file, it won't tell you what you need to install to get it. – David C. Bishop May 25 '13 at 10:09
@DavidC.Bishop Is that not the very same thing? – Victor May 1 '14 at 0:19
@Victor No, the package must be installed on the system already in order to query it. – David C. Bishop May 2 '14 at 1:31
@DavidC.Bishop Ah I see, you meant "what installed package owns a fle". Thanks! – Victor May 2 '14 at 14:52

the google way:

site:www.archlinux.org/packages/ bin/filename

and in case it is in AUR instead of an official package:

site:aur.archlinux.org/packages/ bin/filename
share|improve this answer
Not bad at all. – ychaouche Jul 11 '15 at 2:04

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.