(入门安装 7 使用 nix清理磁盘)nixos 从0实现全集 梦中情os

nixos 一个很大的缺点就是 这玩意狂吃磁盘

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
sudo nix-env --profile /nix/var/nix/profiles/system --list-generations
sudo nix-env --profile /nix/var/nix/profiles/system --delete-generations +1
sudo nix-env --profile /nix/var/nix/profiles/per-user/root/channels --delete-generations +1
sudo nix-env --profile /nix/var/nix/profiles/per-user/yh/channels --delete-generations +1
sudo nix-env --profile /nix/var/nix/profiles/per-user/yh/profile --delete-generations +1
sudo nix-env --profile /nix/var/nix/profiles/per-user/yh/home-manager --delete-generations +1
nix-collect-garbage
nix-collect-garbage -d 
nix-store --gc --print-roots
nix-store --optimise

+$1 是你想保留的快照次数

Licensed under CC BY-NC-SA 4.0
comments powered by Disqus
使用 Hugo 构建
主题 StackJimmy 设计