Delete Nix Garbage - Reclaim Disk Space | Online Free DevTools by Hexmos

Delete Nix garbage and reclaim valuable disk space using nix-collect-garbage command. Remove unused store paths and manage Nix generations efficiently. Free online tool, no registration required.

nix-collect-garbage

Delete unused and unreachable nix store paths. Generations can be listed using nix-env --list-generations. More information: https://nixos.org/manual/nix/stable/command-ref/nix-collect-garbage.html.

  • Delete all store paths unused by current generations of each profile:

sudo nix-collect-garbage {{[-d|--delete-old]}}

  • Simulate the deletion of old store paths:

sudo nix-collect-garbage {{[-d|--delete-old]}} --dry-run

  • Delete all store paths older than 30 days:

sudo nix-collect-garbage --delete-older-than 30d