astro / nix-cache-cut

Trim Nix binary caches according to GC roots

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

nix-cache-cut

Yet another garbage collector for Nix binary caches.

This one runs with a list of GC roots just like your ordinary nix-collect-garbage. It does not operate time-based to expire old files like lheckemann's cache-gc.

Usage

$ nix run github:astro/nix-cache-cut -- --help
Trim Nix binary caches according to GC roots

Usage: nix-cache-cut [OPTIONS] <CACHEDIR> [GCROOTS]...

Arguments:
  <CACHEDIR>    Cache directory
  [GCROOTS]...  Garbage collector roots [default: /nix/var/nix/gcroots]

Options:
  -n, --dry-run  Do not actually delete files
  -h, --help     Print help
  -V, --version  Print version

About

Trim Nix binary caches according to GC roots

License:MIT License


Languages

Language:Rust 85.4%Language:Nix 14.6%