1
0
Fork 0
mirror of https://github.com/tldr-pages/tldr.git synced 2025-04-22 17:02:09 +02:00
tldr/pages/common/nix-collect-garbage.md
2018-05-06 10:38:47 +01:00

16 lines
448 B
Markdown

# nix-collect-garbage
> Delete unused and unreachable nix store paths.
> Generations can be listed using `nix-env --list-generations`.
- Delete all store paths unused by current generations of each profile:
`sudo nix-collect-garbage --delete-old`
- Simulate the deletion of old store paths:
`sudo nix-collect-garbage --delete-old --dry-run`
- Delete all store paths older than 30 days:
`sudo nix-collect-garbage --delete-older-than {{30d}}`