apk-audit(8)

🌸 NAME 🌸

okay so this is apk-audit(8) from the System Manager's Manual, and it's giving audit directories for changes β€” that's literally the whole vibe. the command is apk audit, and yes bestie, it audits directories for changes. πŸ’…

✨ SYNOPSIS ✨

apk audit [<options>...] directories...

you give it <options>... if you want them, then one or more directories... to audit. periodt.

πŸ¦‹ DESCRIPTION πŸ¦‹

apk audit audits the system or specified directories for changes compared to the package database. it's comparing your disk reality to the package-database receipts, and the results are the whole point.

The audit can be done against configuration files only (--backup) to generate a list of files needed to be stored in the overlay in run-from-tmps configuration. Alternatively, it can audit all installed files (--system or --full) to e.g. detect unauthorized modifications of system files. iconic behavior, honestly.

By default, the output format is one file per line, for each modified file. A character is printed indicating the line type, followed by a space, then the affected path or details. The changes detected are:

  • - β€” Database detail record
  • + β€” On-disk detail record
  • A β€” File added
  • d β€” Directory added
  • D β€” Directory added (with non-listed files/subdirs)
  • e β€” error occurred during audit (e.g. no permissions to read file)
  • M β€” File metadata changed (uid, gid, or mode)
  • m β€” Directory metadata changed
  • U β€” File contents modified
  • X β€” File deleted
  • x β€” xattrs changed

πŸ’… OPTIONS πŸ’…

  • --backup β€” audit configuration files only (this is the default, bestie). The list of files to be audited is generated from the masks in protected_paths.d. πŸŽ€
  • --check-permissions β€” check file permissions too. Namely, the uid, gid, and file mode will be checked in addition to the file content. locked in. πŸ”
  • --details β€” enable reporting of detail records.
  • --full β€” same as --system, but in addition it reports all added directories and files. A built-in default override for protected paths is used, unless a --protected-paths is explicitly specified.
  • --ignore-busybox-symlinks β€” ignore symlinks whose target is the busybox binary.
  • --packages β€” print only the packages with changed files. Instead of the full output for each modification, the set of packages with at least one modified file is printed. To repair all packages with modified files, one could use: apk audit --packages -q | xargs apk fix
  • --protected-paths FILE β€” use the given FILE for protected paths listings. This also makes apk ignore the regular protected_paths.d directories.
  • --recursive, -r β€” descend into directories and audit them as well.
  • --system β€” audit all system files. All files provided by packages are verified for integrity with the exception of configuration files (listed in protected_paths.d). This is useful for detecting unauthorized file changes. New files or directories are not reported.

πŸ”₯ SEE ALSO πŸ”₯

apk-protected_paths(5) β€” go read it for the protected-paths lore, iykyk. πŸ¦‹


that's the tea, bestie 🫢 this was apk-audit(8) from the System Manager's Manual, dated 2026-11-02. now go audit those directories and stay iconic. πŸ’–βœ¨πŸŽ€

πŸ“¦ where this page comes from