EXPAC(1)
β¨ EXPAC(1) β¨ β the expac manual π
π NAME π
expac β alpm data extraction utility
π¦ SYNOPSIS π¦
Usage: expac [options] <format> targets...
πΈ DESCRIPTION πΈ
okay so expac is a data extraction tool for alpm databases, and it's literally giving printf-like flexibility β¨. It's meant to be a simple tool for other pacman based utilities that don't link against the library. It uses pacman.conf as a config file for locating and loading your local and sync databases.
When you invoke expac, you supply a format string β usually one to many of the formatting tokens (peep the FORMATTING section π
) β plus any relevant options and zero to many targets. The format string has to be the first non-option argument. Targets can be a simple package name, a query string (in the case of a search), or repo/package syntax when the -sync option is supplied. Obsessed.
π OPTIONS π
-Q,--queryβ search the local database for provided targets. This is the default behavior.-S,--syncβ search the sync databases for provided targets.-s,--searchβ search for packages matching the strings specified by targets. This is a boolean AND query and regex is allowed.-g,--groupβ return packages matching the specified targets as package groups.--config <file>β read from file for alpm initialization instead of/etc/pacman.conf.-H,--humansize <size>β format package sizes in SI units according to size. Valid options are:B,K,M,G,T,P,E,Z,Y.-1,--readoneβ stop searching after the first result. This only has an effect on-Soperations without-s.-d,--delim <string>β separate each package with the specified string. The default value is a newline character.-l,--listdelim <string>β separate each list item with the specified string. Lists are any interpreted sequence specified with a capital letter. The default value is two spaces.-p,--fileβ interpret targets as paths to local files.-t,--timefmt <format>β output time described by the specified format. This string is passed directly tostrftime(3). The default format is%c.-v,--verboseβ output more.Package not founderrors will be shown, and empty field values will display as'None'.-V,--versionβ display version information and quit.-h,--helpβ display the help message and quit.
π FORMATTING π
The format argument allows the following interpreted sequences, bestie:
%aβ architecture%Bβ backup files%bβ build date%Cβ conflicts with (no version strings)%Dβ depends on%dβ description%Eβ depends on (no version strings)%eβ package base%fβ filename (only with-S)%Fβ files (only with-Q)%gβ base64 encoded PGP signature (only with-S)%Gβ groups%Hβ conflicts with%hβ sha256sum%iβ has install scriptlet (only with-Q)%kβ download size (only with-S)%lβ install date (only with-Q)%Lβ licenses%mβ install size%Mβ modified backup files (only with-Q)%nβ package name%Nβ required by%Oβ optional deps%oβ optional deps (no descriptions)%pβ packager name%Pβ provides%Rβ replaces (no version strings)%rβ repo%sβ md5sum%Sβ provides (no version strings)%Tβ replaces%uβ project URL%Vβ package validation method%vβ version%wβ install reason (only with-Q)%!β result number (auto-incremented counter, starts at 0)%%β literal%
quick lil' note: for any lowercase tokens aside from %m and %k, full printf support is allowed, e.g. %-20n. This does not apply to any list based, date, or numerical output.
Standard backslash escape sequences are supported, as per printf(1).
β EXAMPLES β
Emulate pacman's search function:
$ expac -Ss '%r/%n %v\n %d' <search terms>
List the oldest 10 installed packages (by build date):
$ expac --timefmt=%s '%b\t%n' | sort -n | head -10
π AUTHOR π
Dave Reisner <d@falconindy.com>
later bestie!! this iconic manual is expac 10, dated 2026-08-10 π«Άπ
π¦ where this page comes from
- arch rolling: expac 10-13 Β· GPL
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms