snippetbashTip
nh clean — Clean Nix profiles and delete unused and unreachable Nix store paths. Generations can be listed usin
Viewed 0 times
profilesdeletecommandandnh cleanclinixclean
Problem
How to use the
nh clean command: 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 information: <https://github.com/nix-community/nh#usage>.Solution
nh clean — 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 information: <https://github.com/nix-community/nh#usage>.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]}} {{number}}Clean a specific profile and collect garbage:
nh clean profile {{path/to/profile}}Code Snippets
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]}} {{number}}Clean a specific profile and collect garbage
nh clean profile {{path/to/profile}}Context
tldr-pages: common/nh clean
Revisions (0)
No revisions yet.