Continuation of #171 (due to https://github.com/NixOS/nix/issues/171#issuecomment-359180537).
CC subscribers from over there: @shlevy @jb55 @qknight @nh2 @edolstra
Original problem:
$ nix-store --delete /nix/store/ixmvap0270115iwkz6fljjccghvnf928-nixos-13.10pre34775.a63b4dc
finding garbage collector roots...
error: cannot delete path `/nix/store/ixmvap0270115iwkz6fljjccghvnf928-nixos-13.10pre34775.a63b4dc' since it is still alive
0 store paths deleted, 0.00 MiB freed
And
$ nix-store -q --roots /nix/store/ixmvap0270115iwkz6fljjccghvnf928-nixos-13.10pre34775.a63b4dc
/nix/var/nix/profiles/system-53-link`
Would be nice if instead the first command output:
$ nix-store --delete /nix/store/ixmvap0270115iwkz6fljjccghvnf928-nixos-13.10pre34775.a63b4dc
finding garbage collector roots...
error: cannot delete path `/nix/store/ixmvap0270115iwkz6fljjccghvnf928-nixos-13.10pre34775.a63b4dc' since it is still alive (reachable from /nix/var/nix/profiles/system-53-link)
0 store paths deleted, 0.00 MiB freed
Hello,
I am looking for an excuse to dive in the nix-store garbage collector code. I'm fixing this one if it's ok with @shlevy :)
@NinjaTrappeur looks like you already got steps in the right direction. What is the current status? Did you run into a problem? Can I help get this merged into Nix?
Hey @bobvanderlinden ,
So, I made a UI proposal there, and tested it a bit in order to spot obvious regressions.
I am waiting for some feedback. Both for the feature by itself as well as for the code.
For me it was because it was still used by direnv (with use nix), and I imported the package in my shell.nix. I forget sometimes that direnv is on the background.
Just sharing my finding. Hope it helps someone.
Most helpful comment
Hello,
I am looking for an excuse to dive in the nix-store garbage collector code. I'm fixing this one if it's ok with @shlevy :)