Forrest logo
tool overview
On this page you find all important commands for the CLI tool nix-collect-garbage. If the command you are looking for is missing please ask our AI.

nix-collect-garbage

nix-collect-garbage is a command-line tool used in the Nix package manager to reclaim disk space by removing unused and old built packages and dependencies. It is a garbage collection utility specifically designed for the Nix package management system. When packages are built or modified in Nix, old versions and unused dependencies can accumulate and take up disk space. nix-collect-garbage scans the Nix store directory and identifies all the items that are no longer accessible or referenced. The tool then removes these unreferenced items, freeing up disk space. It is particularly useful in scenarios where multiple versions of packages are built and installed, leading to a large number of unused artifacts. The garbage collection process performed by nix-collect-garbage is automated and efficient. By executing nix-collect-garbage, system administrators can keep the Nix store compact and prevent unnecessary disk space usage. It helps maintain the integrity of the Nix package repository by removing redundant packages and dependencies. Overall, nix-collect-garbage is a valuable tool for managing disk space and optimizing the Nix package management system.

List of commands for nix-collect-garbage:

tool overview