nix-store
操作或查询 Nix 存储。 另请参阅:
nix store.3。 更多信息:https://nix.dev/manual/nix/stable/command-ref/nix-store.html。
- 执行垃圾回收,比如删除未使用的路径:
nix-store --gc
- 将相同的文件硬链接到一起以节省空间:
nix-store --optimise
- 删除特定的存储路径(必须未在使用中):
nix-store --delete /nix/store/
- 以树状格式显示存储路径(包)的所有依赖关系:
nix-store --tree /nix/store/
- 计算某个存储路径及其所有依赖关系的总大小:
du $(nix-store --references /nix/store/)
- 显示特定存储路径的所有依赖项:
nix-store --referrers /nix/store/
来源:tldr-pages contributors · 作者与贡献记录 · CC BY 4.0。离线整理了版式、链接和媒体显示。
