当我列出我当前的 Guix 垃圾收集根时,我找到了一个我想要删除的根,最后一个属于我不再开发的项目。
$ guix gc --list-roots
/var/guix/profiles/per-user/rovanion/current-guix-30-link
/var/guix/profiles/per-user/rovanion/current-guix-30-link
/var/guix/profiles/per-user/rovanion/guix-profile-133-link
/var/guix/profiles/per-user/rovanion/guix-profile-133-link
/var/guix/profiles/per-user/rovanion/current-guix-30-link
/home/rovanion/source/python/a-project/.direnv/.guix-profile
阅读手册页调用 guix gc我找到了有关如何添加额外根的说明,但没有找到有关如何删除它们的说明。
答案1
只需删除路径
rm /home/rovanion/source/python/a-project/.direnv/.guix-profile
之后,guix gc --list-roots
不应再显示
下一次运行垃圾收集将删除这些文件
答案2
看来我还必须删除根
/var/guix/gcroots/auto/$hash
对应于符号链接
ls -l /home/rovanion/source/python/a-project/.direnv/.guix-profile
lrwxrwxrwx 1 rovanion users 36 Mar 24 2020 /home/rovanion/source/python/a-project/.direnv/.guix-profile -> /var/guix/gcroots/auto/$hash