首页 文章

撤消`nix-channel --update`

提问于
浏览
1

通过NixOps进行全新安装后,我登录到机器并执行

# nix-channel --update

这将~130Mb的nixpkgs拉入我的 /nix/store . 我怎么撤消这个?

2 回答

  • 1

    我对 nix 不太熟悉,但基于手册页here,我想打电话给

    nix-channel --rollback
    

    会撤消你的事情

    nix-channel --update
    
  • 1

    所以我找到了办法 . 我必须删除GC根和相关的符号链接

    rm /nix/var/nix/profiles/per-user/root/channels-1-link
    rm /nix/var/nix/profiles/per-user/root/channels
    rm ~/.nix-defexpr/channels
    nix-collect-garbage -d
    

相关问题