nix-heuristic-gc
A more discerning cousin of nix-collect-garbage
, mostly intended as a testbed to allow experimentation with more advanced selection processes.
Developers and users who make use of a lot of packages ephemerally end up with a large nix store full of packages which may or may not be used again in the near future, but aren’t referenced from a GC-root. While nix-collect-garbage
's --max-freed
option is handy here, it still selects which paths to delete at random.
nix-heuristic-gc
uses a greedy algorithm to prefer deletion of less-recently accessed (or more easily replaceable) store paths.