Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/blitz/nix-link-cleanup
Clean up Nix result links to allow garbage collection to do its thing!
https://github.com/blitz/nix-link-cleanup
nix nix-flake
Last synced: 1 day ago
JSON representation
Clean up Nix result links to allow garbage collection to do its thing!
- Host: GitHub
- URL: https://github.com/blitz/nix-link-cleanup
- Owner: blitz
- License: gpl-3.0
- Created: 2024-07-05T13:59:01.000Z (4 months ago)
- Default Branch: main
- Last Pushed: 2024-10-17T22:33:19.000Z (21 days ago)
- Last Synced: 2024-10-20T08:17:39.412Z (19 days ago)
- Topics: nix, nix-flake
- Language: Nix
- Homepage:
- Size: 34.2 KB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Nix Result Links Cleaner
A CLI program to recursively scan a specified directory for Nix result
symbolic links and optionally delete them.## Why?
Have you ever wondered why `nix-collect-garbage` does not clean up as
much stuff as you'd think it should? Maybe all the build results of
your `nix-build` adventures are still around and keeping `/nix/store`
paths alive.I used to run `find . -name "result*" -type l -print -delete`, but
that occasionally deletes things it shouldn't. Oops. So here we are
with a dedicated tool!## What does it do?
This tool finds all symbolic links that are called `result` or
`result-*` and point to a Nix store path. Then it can delete them, if
you opt-in via `--delete`.## Building
This is a Rust app without anything special. So you can do:
```console
$ cargo build --release
$ cargo run --release -- --help
```## Contribution
Contributions are welcome! We strive for a super simple tool, so some
features might be rejected to keep it minimal.## License
This project is licensed as GPLv3 or later.