Linux command
nh-clean 命令
文本
复制后可按需替换文件名、目录或参数。
常用示例
Clean user profile
nh clean user
Clean all profiles
nh clean all
Clean with age limit
nh clean all --keep [30d]
Dry run
nh clean all --dry
说明
nh clean removes old Nix profile generations and runs garbage collection. Friendly wrapper around nix-collect-garbage. Part of nh (nix helper) toolkit.
参数
- user
- Clean user profile.
- all
- Clean all profiles.
- --keep _period_
- Keep generations newer than period.
- --keep-since _date_
- Keep generations since date.
- --dry
- Dry run.
FAQ
What is the nh-clean command used for?
nh clean removes old Nix profile generations and runs garbage collection. Friendly wrapper around nix-collect-garbage. Part of nh (nix helper) toolkit.
How do I run a basic nh-clean example?
Run `nh clean user` in a terminal, then adjust file names, paths, flags, or remote targets for your system.
What does user do in nh-clean?
Clean user profile.