https://github.com/astro/nix-cache-cut
Trim Nix binary caches according to GC roots
https://github.com/astro/nix-cache-cut
binary-cache gc nix nixos
Last synced: about 2 months ago
JSON representation
Trim Nix binary caches according to GC roots
- Host: GitHub
- URL: https://github.com/astro/nix-cache-cut
- Owner: astro
- License: mit
- Created: 2023-02-22T22:29:15.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2023-06-07T23:07:48.000Z (almost 2 years ago)
- Last Synced: 2025-03-24T05:11:37.106Z (2 months ago)
- Topics: binary-cache, gc, nix, nixos
- Language: Rust
- Homepage:
- Size: 29.3 KB
- Stars: 4
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# 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](https://github.com/lheckemann/cache-gc).## Usage
```console
$ nix run github:astro/nix-cache-cut -- --help
Trim Nix binary caches according to GC rootsUsage: nix-cache-cut [OPTIONS] [GCROOTS]...
Arguments:
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
```