-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
sudo nix-collect-garbage -d
does not remove all old generations
#8294
Comments
Also noticed that recently, can confirm it happens on my machine as well. |
Seeing lack of |
I think that's something that should be fixed by #8154 . Can anyone confirm? If that's the case, I'll try bumping it up |
I confirm #8154 does fix |
Yep, #8154 fixes it for me as well! |
Regression test for NixOS#8294
Describe the bug
These commands have been run in the order presented.
sudo nix-collect-garbage -d -vvvvv
sudo nix-env --list-generations -p /nix/var/nix/profiles/system
readlink /nix/var/nix/gcroots/auto/*
nix-store --query --roots /nix/var/nix/gcroots/auto/1mx9j7ygdspmvpdxc4aqfs6w9ak0h05g
On a different machine (I'm leaving the one I pulled the above logs from alone in case we need to extract more information from it) where I had the same problem, I ran
sudo nix-env -p /nix/var/nix/profiles/system --delete-generations +1
which printedremoving profile version xyz
a bunch, thensudo nix-collect-garbage -d
again, which then actually deleted all the old generations. However, my understanding is that this shouldn't be necessary andsudo nix-collect-garbage -d
on its own should be enough to achieve this.Steps To Reproduce
sudo nix-collect-garbage -d
sudo nix-env --list-generations -p /nix/var/nix/profiles/system
outputs the current generation but also multiple old generationsExpected behavior
All generations except the current one should have been deleted.
nix-env --version
output:nix-env (Nix) 2.15.0
Priorities
Add 👍 to issues you find important.
The text was updated successfully, but these errors were encountered: