nh clean
all
Clean Nix profiles and delete unused and unreachable Nix store paths. Generations can be listed using `nix-env --list-generations` or `nh os info`.
More info →Options (2)
-a, --askbooleanAsk for clean up plan confirmation, clean all profiles and collect garbage
Example:
nh clean all {{[-a|--ask]}}-k, --keepbooleanKeep a specified number of the most recent profiles for the current user and clean the remaining profiles
Example:
nh clean user {{[-k|--keep]}} {{number}}Examples (3)
Ask for clean up plan confirmation, clean all profiles and collect garbage
nh clean all [-a|--ask]Keep a specified number of the most recent profiles for the current user and clean the remaining profiles
nh clean user [-k|--keep] numberClean a specific profile and collect garbage
nh clean profile path/to/profilemade by @shridhargupta | data from tldr-pages