PKG-CHECK(8)

πŸ“¦ version 2.7.5, in nixos 26.05, nixpkgs unstable

πŸ’… 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 -d or pkg check --dependencies β€” checks for missing dependencies and installs them. not just looking, actually doing the thing 🫢
  • pkg check -m or pkg check --metadata β€” checks for metadata discrepancies between the recorded state in pkgdb and the filesystem. like, does the receipt match what's actually in your bag? πŸ’€
  • pkg check -s or pkg 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 unless CASE_SENSITIVE_MATCH has been set to true in pkg.conf. so like, it's the default-default, we're just saying πŸŽ€
  • -m, --metadata β€” checks for metadata discrepancies between the recorded state in pkgdb and 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 in re_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_DBDIR
  • CASE_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