PKG-CHECK(8)
π PKG-CHECK(8) β the sanity check era β¨
okay so bestie, welcome to pkg-check(8) from the System Manager's Manual β yes that's the manual name, we're being official today π β this is the page where pkg check does a little vibe check on your installed packages and tells you what's giving chaos.
πΈ SYNOPSIS πΈ
pkg check -d|-s|-m [-nqvy] -a
pkg check -d|-s|-m [-nqvy] [-Cgix] pattern
pkg check --{dependencies,checksums,metadata}
[--{dry-run,quiet,verbose,yes}] --all
pkg check --{dependencies,checksums,metadata}
[--{dry-run,quiet,verbose,yes}]
[--{case-sensitive,glob,case-insensitive,regex}] pattern
short flags or long flags, pick your fighter π both are iconic and both work.
β¨ DESCRIPTION β¨
so like, there are three modes and each one is doing its own little job, no cap:
pkg check -dorpkg check --dependenciesβ checks for missing dependencies and installs them. not just looking, actually doing the thing π«Άpkg check -morpkg check --metadataβ checks for metadata discrepancies between the recorded state inpkgdband the filesystem. like, does the receipt match what's actually in your bag? πpkg check -sorpkg check --checksumsβ detects installed packages with invalid checksums. and bestie, an invalid checksum can be caused by data corruption or tampering π so yeah, not the cute kind of surprise.
π¦ OPTIONS π¦
these options are supported by pkg check, and yes we're listing every single one because we don't skip π
-a,--allβ process all packages. the whole roster, no crumbs left behind π-C,--case-sensitiveβ use case sensitive standard or regular expression (-x) matching with pattern. uppercase and lowercase are NOT the same person, okay?-d,--dependenciesβ checks for and installs missing dependencies-g,--globβ treat pattern as a shell glob pattern. wildcards get to wildcard π-i,--case-insensitiveβ use case insensitive standard or regular expression (-x) matching with pattern. this is the default unlessCASE_SENSITIVE_MATCHhas been set to true inpkg.conf. so like, it's the default-default, we're just saying π-m,--metadataβ checks for metadata discrepancies between the recorded state inpkgdband the filesystem-n,--dry-runβ only check for missing dependencies, do not install them. look, don't touch, main character energy π₯-s,--checksumsβ detects installed packages with invalid checksums-v,--verboseβ be verbose. say more, bestie π£οΈ-q,--quietβ suppress most output, except for error messages and data that the command explicitly requests. this is primarily intended for scripting use. it's giving "i'm in my silent era" π€«-x,--regexβ treat pattern as a regular expression, using the "modern" or "extended" syntax described inre_format(7). fancy mode, activated β¨-y,--yesβ assume "yes" when asked for confirmation before installing missing dependencies. consent pre-granted, we move π«‘
π ENVIRONMENT π
these environment variables affect the execution of pkg check. see pkg.conf(5) for additional information, iykyk.
PKG_DBDIRCASE_SENSITIVE_MATCH
π FILES π
see pkg.conf(5). that's the whole section, she's lowkey mysterious like that π§
β EXAMPLES β
test for missing dependencies needed by nano, installing any that are missing:
pkg check -d nano
test the checksums of all installed packages to make sure none are corrupted:
pkg check -sa
if corrupted packages are found, they can be reinstalled using:
pkg install -f <package-name>
literally that last one is the glow-up-and-reinstall move, keep it in your back pocket π
π SEE ALSO π
pkg_create(3), pkg_printf(3), pkg_repo_create(3), pkg_repos(3), pkg-keywords(5), pkg-lua-script(5), pkg-repository(5), pkg-script(5), pkg-triggers(5), pkg.conf(5), pkg(8), pkg-add(8), pkg-alias(8), pkg-annotate(8), pkg-audit(8), pkg-autoremove(8), pkg-clean(8), pkg-config(8), pkg-create(8), pkg-delete(8), pkg-fetch(8), pkg-help(8), pkg-info(8), pkg-install(8), pkg-key(8), pkg-lock(8), pkg-plugins(8), pkg-query(8), pkg-register(8), pkg-repo(8), pkg-repositories(8), pkg-rquery(8), pkg-search(8), pkg-set(8), pkg-shell(8), pkg-shlib(8), pkg-ssh(8), pkg-stats(8), pkg-triggers(8), pkg-unregister(8), pkg-update(8), pkg-updating(8), pkg-upgrade(8), pkg-version(8), pkg-which(8)
like the entire friend group showed up to the function π―ββοΈ
one last thing bestie: -s is looking for data corruption or tampering β that's serious, not a vibe, treat it with the respect it deserves π
π« that's the whole page π« this edition comes from Debian, dated May 2, 2024 β pkg-check(8), and yes we're closing out with the same manual name we opened with, symmetry slay π
β¨
π¦ where this page comes from
- nixos 26.05: pkg 2.7.5
- nixpkgs unstable: pkg 2.7.5
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms