Difference between revisions of "Pkgfile"

From ArchWiki
Jump to: navigation, search
(Inform that now this can be also done with pacman itself)
(simplification and beautification of wikilinks (interactive))
(Tag: wiki-scripts)
Line 14: Line 14:
{{Tip|Note since {{Pkg|pacman}} version 5.0   
{{Tip|Note since {{Pkg|pacman}} version 5.0   
[[pacman#Search for a package that contains a specific file |a similar functionality is built in]].}}
[[pacman#Search for a package that contains a specific file|a similar functionality is built in]].}}
== Installation ==
== Installation ==

Revision as of 17:07, 17 May 2017

pkgfile is a tool for searching files from packages in the official repositories.

Tip: Note since pacman version 5.0 a similar functionality is built in.


Install pkgfile from the official repositories, or pkgfile-gitAUR from the AUR.

The pkgfile database can then be synced with:

# pkgfile -u


To search for a package that owns the file makepkg:

$ pkgfile makepkg

To list all files provided by archlinux-keyring:

$ pkgfile -l archlinux-keyring
core/archlinux-keyring usr/
core/archlinux-keyring usr/share/
core/archlinux-keyring usr/share/pacman/
core/archlinux-keyring usr/share/pacman/keyrings/
core/archlinux-keyring usr/share/pacman/keyrings/archlinux-revoked
core/archlinux-keyring usr/share/pacman/keyrings/archlinux-trusted
core/archlinux-keyring usr/share/pacman/keyrings/archlinux.gpg

Latter is comparable to pacman -Ql (see pacman#Querying package databases), except it applies to remote packages.

Command not found

See Bash#Command not found and Zsh#The "command not found" hook.

Automatic updates

pkgfile ships with a systemd service and timer for automatically synchronizing the pkgfile database. To activate automatic updates enable pkgfile-update.timer.

By default, pkgfile will be updated daily. To change this schedule, edit the unit file.