LinuxCommandLibrary

pkgfile

Search Arch repositories for file ownership

TLDR

Synchronize pkgfile database

$ sudo pkgfile --update
copy
Search for package owning a file
$ pkgfile [filename]
copy
List files provided by a package
$ pkgfile --list [package]
copy
List executables in a package
$ pkgfile --list --binaries [package]
copy
Case-insensitive search
$ pkgfile --ignorecase [filename]
copy
Search in bin/sbin directories only
$ pkgfile --binaries [filename]
copy
Search with version display
$ pkgfile --verbose [filename]
copy

SYNOPSIS

pkgfile [--update] [--list] [--binaries] [--verbose] [--repo repo] target

DESCRIPTION

pkgfile searches for packages in the official Arch Linux repositories that contain a specific file. It maintains its own database of file-to-package mappings for fast lookups.
The tool is commonly used to find which package provides a missing command or file. It can also list all files a package contains, useful for understanding package contents before installation.

PARAMETERS

-u, --update

Synchronize pkgfile database
-l, --list
List files in package
-b, --binaries
Only search/list executables
-i, --ignorecase
Case-insensitive matching
-v, --verbose
Show package version
-r, --repo _repo_
Search specific repository

CAVEATS

Database must be synchronized before use. Only searches official repositories, not AUR. Database updates require root privileges. Large database may take time to download initially.

HISTORY

pkgfile was created for Arch Linux to provide fast file-to-package lookups. It offers similar functionality to `pacman -F` but with a dedicated database optimized for this purpose.

SEE ALSO

pacman(8), pactree(1), pkgstats(1)

> TERMINAL_GEAR

Curated for the Linux community

Copied to clipboard

> TERMINAL_GEAR

Curated for the Linux community