expac
pacman database query tool with custom formatting
TLDR
SYNOPSIS
expac [options] format [targets]
DESCRIPTION
expac extracts data from alpm databases using printf-like format strings. It provides flexible output formatting for pacman-based package queries.The tool acts as a lightweight alternative to parsing pacman output, offering direct access to package metadata including dependencies, sizes, descriptions, and installation dates. Format specifiers like %n (name), %v (version), %D (dependencies) enable custom reports.Useful for scripting, package analysis, and generating custom package reports. Particularly powerful when combined with other tools for filtering and processing package information.
PARAMETERS
-S, --sync
Query sync database-Q, --query
Query local database-H, --humansize unit
Human-readable sizes (K, M, G)-d, --delim string
Delimiter between packages (default: newline)-l, --listdelim string
Delimiter for list items (default: two spaces)-t, --timefmt format
Time output format string passed to strftime(3) (default: %c)-1, --readone
Stop after first match-p, --file pkgfile
Query a package file instead of the database
FORMAT SPECIFIERS
Common format specifiers: %n (name), %v (version), %d (description), %D (depends), %E (depends, no version), %O (optional deps), %o (optional deps, no descriptions), %N (required by), %P (provides), %H (conflicts), %G (groups), %m (install size), %k (download size), %r (repo), %u (URL), %a (architecture), %l (install date), %w (install reason), %F (files).
CAVEATS
Arch Linux and derivatives only. Format strings use % specifiers. Part of the pacman ecosystem. Use -H to format sizes in human-readable units (K, M, G, T).
