yaylog
is a CLI util, written in Go / Golang, for arch linux and arch-based linux distros to sort/filter installed packages.
despite the name, it's not limited to yay
and works with any package manager that uses ALPM; so it can be used with pacman
, yay
, paru
, aura
, pamac
, and even yaourt
if you're somehow still using it.
yaylog
supports optional filters/sorting for install date, package name, install reason (explicit/dependency), size on disk, reverse dependencies, dependency requirements, and more. check usage for all available options.
this package is compatible with the following distributions:
- arch linux
- manjaro
- steamOS
- garuda linux
- endeavourOS
- artix linux
- the 50 other arch-based distros, as long as it has pacman installed
- list installed packages with date/timestamps, dependencies, provisions, requirements, size on disk, and version
- display package versions
- filter results by explicitly installed packages
- filter results by packages installed as dependencies
- filter by packages required by a specific package
- sort results by installation date, alphabetically, or by size on disk
- filter results by a specific installation date or date range
- filter results by package size or size range
- filter results by package name (substring match)
- output as a table or JSON
because yay is my preferred AUR helper and the name has a good flow.
- rewrite in golang
- additional filters
- list possibly or confirmed stale/abandoned packages
- sort by size on disk
- dependency graph
- concurrent filtering
- filter by size on disk
- asynchronous progress bar
- channel-based aggregation
- concurrent sorting
- search by text input
- package versions
- filter by date range
- concurrent file reading (2x speed boost)
- remove expac as a dependency (3x speed boost)
- package provisions
- optional full timestamp
- add CI to release binaries
- remove go as a dependency
- filter by range of size on disk
- user defined columns
- dependencies of each package
- reverse-dependencies of each package (required-by field)
- package descriptions
- package URLs
- package architecture
- name exclusion filter
- self-referencing column
- JSON output
- no-headers option
- provides filter
- depends filter
- all-columns option
- required-by filter
- key/value output
- list of packages in required-by filter
- config dependency injection for testing
- more extensive testing
install using AUR helper like yay
:
yay -S yaylog
if you prefer to install a pre-compiled binary* using the AUR, use the yaylog-bin
package instead.
*note: binaries are automatically, securely, and transparently compiled with github CI when a version release is created. you can audit the binary creation by checking the relevant github action for each release version.
for the latest (unstable) version from git w/ the AUR, use yaylog-git
*.
*note: this is not recommended for most users
note: this packages is specific to arch-based linux distributions
- clone the repo:
git clone https://github.com/zweih/yaylog.git cd yaylog
- build the binary:
go build -o yaylog ./cmd/yaylog
- copy the binary to your system's
$PATH
:sudo install -m755 yaylog /usr/bin/yaylog
- copy the manpage:
sudo install -m644 yaylog.1 /usr/share/man/man1/yaylog.1
yaylog [options]
-n <number>
|--number <number>
: number of recent packages to display (default: 20)-a
|all
: show all installed packages (ignores-n
)-e
|--explicit
: show only explicitly installed packages-d
|--dependencies
: show only packages installed as dependencies--date <filter>
: filter packages by installation date. Supports:YYYY-MM-DD
- show packages installed on the specified dateYYYY-MM-DD:
- show packages installed on or after the date:YYYY-MM-DD
- show packages installed up to the dateYYYY-MM-DD:YYYY-MM-DD
- show packages installed within a date range
--size <filter>
: filter packages by size on disk. Supports:10MB
- show packages exactly 10MB in size5GB:
- show packages 5GB and larger:20KB
- show packages up to 20KB1.5MB:2GB
- show packages between 1.5MB and 2GB- valid units: B (bytes), KB, MB, GB
--name <search-term>
: filter packages by name (substring match)- example:
gtk
matchesgtk3
,libgtk
, etc.
- example:
--sort <mode>
: sort results by:date
(default) - sort by installation datealphabetical
- sort alphabetically by package namesize:asc
/size:desc
- sort by package size (ascending or descending)
--no-headers
: omit column headers in table output (useful for scripting)--columns <list>
: comma-separated list of columns to display (cannot use with--all-columns
or--add-columns
)--add-columns <list>
: comma-separated list of columns to add to defaults orall-columns
--all-columns
: show all available columns in the output (overrides defaults)--full-timestamp
: display the full timestamp (date and time) of package installations instead of just the date--json
: output results in JSON format (overrides table output and--full-timestamp
)--no-progress
: force no progress bar outside of non-interactive environments--required-by <package-name>
: show only packages that are required by the specified package-h
|--help
: print help info
date
- installation date of the packagename
- package namereason
- installation reason (explicit/dependency)size
- package size on diskversion
- installed package versiondepends
- list of dependencies (output can be long)required-by
- list of packages required by the package and are dependent (output can be long)provides
- list of alternative package names or shared libraries provided by package (output can be long)
the --json
flag outputs the package data as structured JSON instead of a table. this can be useful for scripts or automation.
example:
yaylog --name sqlite --all-columns --json
sqlite
is one of the few packages that actually has all the fields populated.
output format:
[
{
"timestamp": "2025-02-26T16:33:47Z",
"name": "sqlite",
"reason": "dependency",
"size": 21074944,
"version": "3.48.0-2",
"depends": [
"readline",
"zlib",
"glibc"
],
"requiredBy": [
"docker",
"gnupg",
"libsoup3",
"nss",
"openslide",
"tinysparql",
"util-linux-libs"
],
"provides": [
"sqlite3=3.48.0",
"libsqlite3.so=0-64"
]
}
]
-
when using multiple short flags, the -n flag must be last since it consumes the next argument. this follows standard unix-style flag parsing, where positional arguments (like numbers) are treated as separate parameters.
invalid:
yaylog -ne 15 # incorrect usage
valid:
yaylog -en 15
-
the
depends
,provides
,required-by
columns output can be lengthy, packages likeglibc
are required by thousands of packages. to improve readability, pipe the output toless
:yaylog --columns name,depends | less
-
all options that take an argument can also be used in the
--<flag>=<argument>
format:yaylog --size=100MB:1GB --date=:2024-06-30 --number=100 yaylog --name=gtk --sort=alphabetical
boolean flags can also be explicitly set using
--<flag>=true
or--<flag>=false
:yaylog --explicit=true --dependencies=false --no-progress=true
string arguments can also be surrounded with quotes or double-quotes:
yaylog --sort="alphabetical" --name="vim"
this can be useful for scripts and automation where you might want to avoid any and all ambiguity.
note:
--no-progress
is automatically set totrue
when in a non-interactive environment, so you can pipe|
into programs likecat
,grep
, orless
without issue -
the
--no-headers
flag is useful when processing output in scripts. It removes the header row, making it easier to parse package lists with tools likeawk
,sed
, orcut
:yaylog --no-headers --columns name,size | awk '{print $1, $2}'
- show the last 10 installed packages:
yaylog -n 10
- show all explicitly installed packages:
yaylog -ae
- show only dependencies installed on a specific date:
yaylog -d --date 2024-12-25
- show all packages sorted alphabetically:
yaylog -a --sort alphabetical
- show the 15 most recent explicitly installed packages:
yaylog -en 15
- show packages installed between July 1, 2023, and December 31, 2023:
yaylog --date 2023-07-01:2023-12-31
- show the 20 most recently installed packages larger than 20MB:
yaylog --size 20MB:
- show all dependencies smaller than 500KB:
yaylog -ad --size :500KB
- show packages between 100MB and 1GB installed up to June 30, 2024:
yaylog --size 100MB:1GB --date :2024-06-30
- show all packages sorted by size in descending order, installed after January 1, 2024:
yaylog -a --sort size:desc --date 2024-01-01:
- search for installed packages containing "python":
yaylog --name python
- search for explicitly installed packages containing "lib" that are between 10MB and 1GB in size:
yaylog -e --name lib --size 10MB:1GB
- search for packages containing "linux" that were installed between January 1 and June 30, 2024:
yaylog --name linux --date 2024-01-01:2024-06-30
- search for packages containing "gtk" that were installed after January 1, 2023, and are at least 5MB in size:
yaylog --name gtk --date 2023-01-01: --size 5MB:
- show packages with name, version, and size:
yaylog --columns name,version,size
- show package names and dependencies with
less
for readability:
yaylog --columns name,depends | less
- output package data in JSON format:
yaylog --json
- save all explicitly installed packages to a JSON file:
yaylog -ae --json > explicit-packages.json
- output all packages sorted by size (descending) in JSON:
yaylog --json -a --sort size:desc
- output JSON with specific columns:
yaylog --json --columns name,version,size
- show all available package details:
yaylog --all-columns
- output all packages with all columns/fields in JSON format:
yaylog -a --all-columns --json
- show package names and sizes without headers for scripting:
yaylog --no-headers --columns name,size
- show all packages required by "firefox":
yaylog --required-by firefox
- show all packages required by "gtk3" that are at least 50MB in size:
yaylog --required-by gtk3 --size 50MB:
- show packages required by "vlc" and installed after January 1, 2024:
yaylog --required-by vlc --date 2024-01-01: