.\" -*- mode: troff; coding: utf-8 -*- .\" Automatically generated by Pod::Man v6.0.2 (Pod::Simple 3.45) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>. .ie n \{\ . ds C` "" . ds C' "" 'br\} .el\{\ . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" .\" Required to disable full justification in groff 1.23.0. .if n .ds AD l .\" ======================================================================== .\" .IX Title "PKGFILE 1" .TH PKGFILE 1 2026-08-05 "pkgfile 26" "pkgfile Manual" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH NAME pkgfile \- an alpm .files metadata explorer .SH SYNOPSIS .IX Header "SYNOPSIS" Usage: \fIpkgfile\fR [operation] [options] target .SH DESCRIPTION .IX Header "DESCRIPTION" pkgfile searches the .files metadata created by \fBrepo\-add\fR(8) to retrieve file information about packages. By default, the provided target is considered to be a filename and pkgfile will return the package(s) which contain this file. The repos which pkgfile searches is determined by those enabled in \&\fI/etc/pacman.conf\fR. .SH OPERATIONS .IX Header "OPERATIONS" .IP "\fB\-l\fR, \fB\-\-list\fR" 4 .IX Item "-l, --list" The target is considered to be a package name rather than a filename, and the contents of the named package are returned. This allows for repo/package style syntax (such as "core/pacman") to limit the breadth of the search, but only when \&\fB\-\-list\fR is used without the \fB\-\-glob\fR or \fB\-\-regex\fR options. .IP "\fB\-s\fR, \fB\-\-search\fR" 4 .IX Item "-s, --search" Search for packages containing the provided target. This is the default mode of operation. .IP "\fB\-u\fR, \fB\-\-update\fR" 4 .IX Item "-u, --update" Update the stored metadata files. It is recommended to create a daily cron job with this command to ensure accurate results. By default, only repos which are found to be newer on the mirror will be downloaded. Pass this option twice to force all repos to be downloaded. .SH MATCHING .IX Header "MATCHING" .IP "\fB\-b\fR, \fB\-\-binaries\fR" 4 .IX Item "-b, --binaries" Return only files which are contained within a bin or sbin directory. .IP "\fB\-d\fR, \fB\-\-directories\fR" 4 .IX Item "-d, --directories" Additionally include directories in search results. .IP "\fB\-g\fR, \fB\-\-glob\fR" 4 .IX Item "-g, --glob" Enable shell\-style glob pattern matching. See \fBglob\fR(7). Note that the shell wildcards \fI*\fR and \fI?\fR will never match path separators. Thus, this kind of matching is useful for searching for entries within directories, e.g. \fI/usr/bin/*\fR. .IP "\fB\-i\fR, \fB\-\-ignorecase\fR" 4 .IX Item "-i, --ignorecase" Disable case sensitivity in matching. .IP "\fB\-r\fR, \fB\-\-regex\fR" 4 .IX Item "-r, --regex" Enable regular expression matching. See \fBpcre\fR(3). .IP "\fB\-R\fR \fIREPO\fR, \fB\-\-repo=\fR\fIREPO\fR" 4 .IX Item "-R REPO, --repo=REPO" Search only the specific repo. .SH OUTPUT .IX Header "OUTPUT" .IP "\fB\-0\fR, \fB\-\-null\fR" 4 .IX Item "-0, --null" Delimit output with null bytes rather than newline characters. .IP "\fB\-q\fR, \fB\-\-quiet\fR" 4 .IX Item "-q, --quiet" Output less. This applies to the \fB\-\-list\fR operation. .IP "\fB\-v\fR, \fB\-\-verbose\fR" 4 .IX Item "-v, --verbose" Output more. This applies to the \fB\-\-search\fR operation. .IP "\fB\-w\fR, \fB\-\-raw\fR" 4 .IX Item "-w, --raw" Avoid justification of 2 column output. .SH "GENERAL OPTIONS" .IX Header "GENERAL OPTIONS" .IP "\fB\-C\fR \fIFILE\fR, \fB\-\-config=\fR\fIFILE\fR" 4 .IX Item "-C FILE, --config=FILE" Use a config file other than the default of \fI/etc/pacman.conf\fR. .IP "\fB\-D\fR \fIDIRECTORY\fR, \fB\-\-cachedir=\fR\fIDIRECTORY\fR" 4 .IX Item "-D DIRECTORY, --cachedir=DIRECTORY" Use a cache path other than the compile\-time default. .IP "\fB\-h\fR, \fB\-\-help\fR" 4 .IX Item "-h, --help" Print help and exit. .IP "\fB\-V\fR, \fB\-\-version\fR" 4 .IX Item "-V, --version" Print the version and exit. .SH "MATCHING HEURISTICS" .IX Header "MATCHING HEURISTICS" In \-\-search mode and without the \-\-regex or \-\-glob option, pkgfile will attempt to match the provided target as an exact filename. If the target contains a \*(Aq/\*(Aq character, a full path match will be attempted. With \-\-regex and \-\-glob enabled searching, pkgfile will always match against the full pathname. .PP In \-\-list mode and without the \-\-regex or \-\-glob option, pkgfile will attempt to match the provided target as an exact package name. If the target contains a \*(Aq/\*(Aq character, the text before the slash will be assumed to be a repository and the search will be restricted. .SH "COMMAND NOT FOUND HOOKS" .IX Header "COMMAND NOT FOUND HOOKS" .IP \fI/usr/share/doc/pkgfile/command\-not\-found.bash\fR 4 .IX Item "/usr/share/doc/pkgfile/command-not-found.bash" .PD 0 .IP \fI/usr/share/doc/pkgfile/command\-not\-found.zsh\fR 4 .IX Item "/usr/share/doc/pkgfile/command-not-found.zsh" .IP \fI/usr/share/doc/pkgfile/command\-not\-found.fish\fR 4 .IX Item "/usr/share/doc/pkgfile/command-not-found.fish" .PD zsh, bash and fish compatible functions which can be included in shell initalization to run pkgfile when an executed command is not found. .Sp If the environment variable PKGFILE_PROMPT_INSTALL_MISSING is set, and only one package is found, a prompt to install the package will be shown. \fBNOTE\fR: this feature requires the \fBsudo\fR(8) program, and is currently only supported by the bash and zsh implementations. .SH "AUTOMATING UPDATES" .IX Header "AUTOMATING UPDATES" It is recommended to use \fBpkgfiled\fR(1) to keep .files DBs up as \`pacman \-Fy\` is issued (either by a user or a cronjob/systemd timer). pkgfiled can be enabled with: .PP .Vb 1 \& systemctl enable \-\-now pkgfiled .Ve .PP Alternatively, pkgfile includes systemd timer and service units to automate periodic updates to the .files DBs. Assuming that pkgfile was built with systemd support, this can be enabled with: .PP .Vb 1 \& systemctl enable \-\-now pkgfile\-update.timer .Ve .SH "SEE ALSO" .IX Header "SEE ALSO" \&\fBpkgfiled\fR(1), \fBrepo\-add\fR(8), \fBpcre\fR(3), \fBglob\fR(7), \fBpacman.conf\fR(5) .SH AUTHOR .IX Header "AUTHOR" Dave Reisner