Skip to content
aokellermannPublic

About

Flexible yay cache cleaning

Topics

Resources

Stars

53 stars

Watchers

1 watching

Forks

Repository files navigation

yaycache

Flexible yay cache cleaning similar to paccache.

Usage

Usage is essentially the same as with paccache.

See man yaycache for more information, or view the docs here.

Pacman Hook

You can use yaycache-hook package (similar to paccache-hook) to automatically run yaycache with configurable arguments after your pacman transactions.

yay -S yaycache-hook

The configuration is stored in /etc/yaycache-hook.conf.

Systemd service

An optional systemd service is included that will run weekly:

systemctl --user enable --now yaycache.timer

The service runs yaycache -r $YAYCACHE_ARGS. Put extra options in /etc/yaycache.conf, or in ~/.config/yaycache.conf which takes precedence:

YAYCACHE_ARGS="-k1 --remove-build-files --min-mtime '30 days ago'"

Installing

An AUR package is available:

yay -S yaycache

Building

You can build the package yourself:

git submodule update --init   # test dependencies (bats-core), only needed for make check
./autogen.sh
./configure --prefix=/usr
make
make check
make install DESTDIR="$pkgdir"

Testing

make check runs the BATS suite with every test file inside a bubblewrap sandbox: throwaway HOME and /tmp, no network, shim sudo/pacman, read-only source tree. The script under test therefore cannot reach your real ~/.cache/yay or escalate privileges. make check-docker runs the same suite, plus make install and make distcheck, in a disposable Arch Linux container. See tests/README.md.

About

Flexible yay cache cleaning

Topics

Resources

Stars

53 stars

Watchers

1 watching

Forks

Releases

Contributors

Languages