Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Path with no GC roots not being garbage collected #7160

Open
Gabriella439 opened this issue Oct 11, 2022 · 1 comment
Open

Path with no GC roots not being garbage collected #7160

Gabriella439 opened this issue Oct 11, 2022 · 1 comment
Labels

Comments

@Gabriella439
Copy link
Contributor

Gabriella439 commented Oct 11, 2022

Describe the bug

Nix refuses to garbage collect a path with no garbage collection roots

Steps To Reproduce

$ nix-store --delete /nix/store/kazyfiacq0mfcaqy28c4micglqxw9fhb-nixos-system-nixos-22.11.20220918.f1a49e2
finding garbage collector roots...
0 store paths deleted, 0.00 MiB freed
error: Cannot delete path '/nix/store/kazyfiacq0mfcaqy28c4micglqxw9fhb-nixos-system-nixos-22.11.20220918.f1a49e2' since it is still alive. To find out why, use: nix-store --query --roots

$ nix-store --query --roots /nix/store/kazyfiacq0mfcaqy28c4micglqxw9fhb-nixos-system-nixos-22.11.20220918.f1a49e2

$ # No output from the prior command

Expected behavior

I expected the path to be garbage collected since there are no garbage collection roots protecting the path.

Additional context

$ nix --version
nix (Nix) 2.11.0

The relevant parts of my Nix configuration are:

$ nix show-config

keep-derivations = true

keep-outputs = false

I also verified that there were no temp roots associated with the path either. The only thing in /nix/var/nix/temproots was /nix/var/nix/temproots/30015 which contained this:

/nix/store/hy04g0cmmsvkwabwas03d7kjv1y40pd9-source^@/nix/store/ln3h4rn8hfmn7jdlwqffixi8611zj90n-source^@

I also tried restarting the nix-daemon and trying again.

The problem still remains but it is not urgent to fix, so I can let it stay this way and run additional commands to debug things further if that helps.

@ncfavier
Copy link
Member

Possible duplicates: #6135 #6141 #7053

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants