PKGFILE(1)
π PKGFILE(1) β the pkgfile manual, but make it make sense π
okay so bestie, welcome to PKGFILE(1), aka the pkgfile manual page. it's an alpm .files metadata explorer and honestly? it's that girl. let's get into it π
β¨ NAME β¨
pkgfile β an alpm .files metadata explorer π¦
β¨ SYNOPSIS β¨
Usage: pkgfile [operation] [options] target
β¨ DESCRIPTION β¨
so like, pkgfile goes digging through the .files metadata that repo-add(8) created, to pull up file info about packages π. by default it treats whatever target you handed it as a filename, and gives you back the package(s) that contain that file. and which repos does it search? the ones you've enabled in /etc/pacman.conf, periodt π
β¨ OPERATIONS β¨
-l,--listβ now the target is treated as a package name instead of a filename, and you get the contents of that package back π. this one lets you userepo/packagestyle syntax (like"core/pacman") to narrow the search β but only when--listis used without the--globor--regexoptions, iykyk.-s,--searchβ searches for packages containing the target you gave it. this is the default mode, the main character of operations fr fr π.-u,--updateβ updates the stored metadata files. highly recommend setting up a daily cron job with this command so your results stay accurate π―. by default it only downloads repos that are found to be newer on the mirror β pass this option twice to force all repos to be downloaded. no cap.
β¨ MATCHING β¨
-b,--binariesβ returns only files that live inside abinorsbindirectory π§-d,--directoriesβ also includes directories in the search results, because directories deserve love too π«Ά-g,--globβ turns on shell-style glob pattern matching. seeglob(7). heads up tho: the shell wildcards*and?will never match path separators π. so this kind of matching is your go-to for searching entries within directories, like/usr/bin/*.-i,--ignorecaseβ disables case sensitivity in matching. case? never heard of her β¨-r,--regexβ turns on regular expression matching. seepcre(3).-RREPO,--repo=REPO β searches only that specific repo. one repo, only vibes π―
β¨ OUTPUT β¨
-0,--nullβ delimits output with null bytes instead of newline characters.-q,--quietβ outputs less. this one applies to the--listoperation.-v,--verboseβ outputs more. this one applies to the--searchoperation.-w,--rawβ avoids justification of the 2 column output. raw and unfiltered, just how we like it π
β¨ GENERAL OPTIONS β¨
-CFILE,--config=FILE β use a config file other than the default of/etc/pacman.conf.-DDIRECTORY,--cachedir=DIRECTORY β use a cache path other than the compile-time default.-h,--helpβ prints help and exits. classic π-V,--versionβ prints the version and exits.
β¨ MATCHING HEURISTICS β¨
okay so in --search mode, and without the --regex or --glob option, pkgfile will try to match your target as an exact filename. and if the target contains a / character, it'll attempt a full path match instead π₯. but with --regex and --glob enabled searching, pkgfile will always match against the full pathname. that's the rule, that's the vibe check.
in --list mode, and without the --regex or --glob option, pkgfile will try to match your target as an exact package name. and if the target contains a / character, the text before the slash gets assumed to be a repository, and the search gets restricted accordingly πΈ
β¨ COMMAND NOT FOUND HOOKS β¨
/usr/share/doc/pkgfile/command-not-found.bash
/usr/share/doc/pkgfile/command-not-found.zsh
/usr/share/doc/pkgfile/command-not-found.fish
these are zsh, bash and fish compatible functions that you can drop into your shell initialization so pkgfile runs whenever an executed command isn't found π β like, the terminal literally goes "idk her" and pkgfile swoops in.
if the environment variable PKGFILE_PROMPT_INSTALL_MISSING is set, and only one package is found, you'll get a prompt to install that package π«Ά. NOTE: this feature requires the sudo(8) program, and is currently only supported by the bash and zsh implementations. the fish girlies will have to wait π
β¨ AUTOMATING UPDATES β¨
it is recommended that you use pkgfiled(1) to keep the .files DBs up as pacman -Fy is issued (either by a user or a cronjob/systemd timer). you can enable pkgfiled with:
systemctl enable --now pkgfiled
alternatively, pkgfile includes systemd timer and service units to automate periodic updates to the .files DBs β°. assuming pkgfile was built with systemd support, you can enable that with:
systemctl enable --now pkgfile-update.timer
slay, your DBs are now self-sufficient π β¨
β¨ SEE ALSO β¨
pkgfiled(1), repo-add(8), pcre(3), glob(7), pacman.conf(5)
β¨ AUTHOR β¨
Dave Reisner <d@falconindy.com> β king behavior π
and that's the whole page bestie, no skips, no cuts π
kisses and goodbye from pkgfile 27, dated 2026-10-24 β that's the version and the date, signed, sealed, delivered, mwah ππ
π¦ where this page comes from
- arch rolling: pkgfile 27-1 Β· MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms