PACREPAIRDB(1)

πŸ“¦ version 0.15.0, in arch rolling

πŸ’… PACREPAIRDB(1) β€” like, the pacrepairdb manual page, bestie πŸŽ€

okay so real talk: this is the page for pacrepairdb, from the pacutils corner of the universe, and it's genuinely iconic for one specific job β€” fixing your busted database entries. come sit with me, we're getting into it πŸ’–


✨ NAME ✨

pacrepairdb β€” fix corrupted database entries 🩹


🌸 SYNOPSIS 🌸

pacrepairdb [options] <package>...
pacrepairdb (--help|--version)

πŸ¦‹ DESCRIPTION πŸ¦‹

So the whole vibe here is: it attempts to repair broken package entries in libalpm's database. Any missing essential files? It creates them, periodt. And the packages get reinstalled from the cache. slay πŸ’…

Also, important little detail: if stdin is not connected to a terminal, package names will be read from stdin. iykyk πŸ‘€


✨ OPTIONS ✨

  • --cachedir=path β€” sets an alternate cache directory path πŸ—‚οΈ
  • --config=path β€” sets an alternate configuration file path πŸ“
  • --dbonly β€” makes the changes to the database without actually extracting or removing any packages. database-only behaviour, no touching the actual files 🫢
  • --dbpath=path β€” sets an alternate database path πŸ—„οΈ
  • --debug β€” displays additional debugging information. detective mode πŸ”
  • --hookdir β€” adds additional user hook directories πŸͺ
  • --logfile=path β€” sets an alternate log file path πŸ““
  • --no-confirm β€” assumes default responses to all prompts. no questions, just vibes 😌
  • --no-scriptlet β€” does not run package install scripts πŸ™…
  • --no-hooks β€” does not run transaction hooks 🚫
  • --no-timeout β€” disables low-speed timeouts for downloads ⏳
  • --print-only β€” displays the packages to be repaired and the cache packages to be used, then exits. look but don't touch πŸ‘€
  • --root=path β€” sets an alternate installation root 🌱
  • --sysroot=path β€” sets an alternate system root. see pacutils-sysroot(7) for the deets πŸ“š
  • --verbose β€” displays additional progress information. tell me everything, bestie πŸ—£οΈ
  • --help β€” displays usage information and exits πŸ†˜
  • --version β€” displays version information and exits 🏷️

πŸ’œ EXAMPLES πŸ’œ

Find and reinstall broken packages:

paccheck --list-broken --files --file-properties --db-files --require-mtree | pacrepairdb

that's the pipe of all time, honestly πŸ”₯


😭 CAVEATS 😭

okay bestie, this is the part where we get serious, because there are some real ones here:

  • pacrepairdb expects all of the packages being repaired to be cached. Cached packages that match the name and version of an installed package are assumed to be the same package. No attempt is made to validate cached packages. And if a cache contains a package that does not match the installed package, but nonetheless has the same name and version, pacrepairdb will blindly install it, worsening any database problems. πŸ’€ like, it will not hesitate. no cap.
  • pacrepairdb does not check for leftover orphaned files. It is the user's responsibility to locate and handle orphaned files 🫑
  • pacrepairdb determines whether or not to read package names from stdin based on a naive check using isatty(3). So if pacrepairdb is called in an environment β€” such as a shell function or script being used in a pipe β€” where stdin is not connected to a terminal but does not contain package names to repair, pacrepairdb should be called with stdin closed. For POSIX-compatible shells, this can be done with "<&-". very much a "trust the process but read the docs" situation πŸ™ˆ
fr fr, do not skip the caveats. they're the whole plot twist 🌈

that's the whole page, angel πŸ’– this one's from pacutils, dated 2025-12-04 β€” go fix those entries and stay hydrated πŸ“βœ¨

πŸ“¦ where this page comes from