-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Cannot delete store path with no roots #6141
Comments
I also encountered the same issue, and it's caused by nix checking all IMHO the liveness check should exclude its own PID. |
also seems to be a duplicate of #6135 |
same issue here
|
Sometimes it is better to do:
as it is not a root, but a drv blocking deletion (nix.conf: keep-derivations?) |
Followed in my case by: nix-store --delete /nix/store/k43kmk5gnd2k1bi2k94ps5rp0ajwrqp1-source so not only the drv store path gets deleted. |
I can reproduce this on Darwin (which rules out
If there are any other details I can add to aid debugging, please let me know. |
This did the trick for me, though the other referrers weren't Should the error message of
|
This issue has been mentioned on NixOS Discourse. There might be relevant details there: https://discourse.nixos.org/t/nix-store-cannot-remove-a-package/20770/11 |
I've also come across this, in my case it was extra puzzling because the path in question (a This issue (and its variants) having kicked around for multiple years, I really think the "quick win" would be to simply change the error message @ Line 787 in b5b6055
If we were really feeling fancy we could conditionally include the "or output paths" part only if |
I had to use --referrers-closure to be able to delete. Thank you for the trick! |
Thanks! The only thing that worked that easily!
I guess it removes entire system derivation but in my case it's fine (I guess???) |
My story in nutshell: I got broken Nextcloud instance after instilling NC app (app resulted broken) on existent instance. I tried to deal with it via nextcloud-occ and got it working. Then tried to reinstall it via NixOS config. At the end of the night Nextcloud (in maintance mode) tried to update app that doesn't exist but the thing is that for unknown reason it was referencing for previous system derivation????
|
On a side note, my guess would be that if you also have |
I also ran into this problem. For me it was triggered because (I think) my disk was full and Nix wrote a large number of empty
I was able to delete each of them manually using the command from #6141 (comment), but it seemed there was no end to the number of To delete all empty
|
Nix team discussion notes:
|
I came across a similar issue. In my case, the paths were of the pattern The paths led me to discover the redundant |
Guys, Im new to Nix and having a ball setting up my box (using flakes and HM)... until today. I am now having this issue myself have tried al the suggestions above:
no result
No effect
No effect
No effect Any other workarounds you can think of? Thanks in advance |
i've also recently encountered this. nix-store --delete /nix/store/vvvk6igaqw7xr8zskqx5dd7fy3761zpn-coreutils-armv7l-unknown-linux-gnueabihf-9.3 outputs:
nix-store --query --roots /nix/store/vvvk6igaqw7xr8zskqx5dd7fy3761zpn-coreutils-armv7l-unknown-linux-gnueabihf-9.3 returns empty nix-store --query --referrers /nix/store/vvvk6igaqw7xr8zskqx5dd7fy3761zpn-coreutils-armv7l-unknown-linux
-gnueabihf-9.3 output:-
nix-store --query --referrers /nix/store/vvvk6igaqw7xr8zskqx5dd7fy3761zpn-coreutils-armv7l-unknown-linux
-gnueabihf-9.3 | xargs nix-store --delete outputs:
nix-store --query --roots /nix/store/apn3kd0k28pv4spgfgaclrwvr652pl7w-nixos-rebuild
nix-store --query --referrers /nix/store/apn3kd0k28pv4spgfgaclrwvr652pl7w-nixos-rebuild both returns nothing nix-store --query --referrers-closure /nix/store/apn3kd0k28pv4spgfgaclrwvr652pl7w-nixos-rebuild returns itself? im not sure how that works |
Describe the bug
Can't delete a store path, even if it isn't reachable by any root.
Steps To Reproduce
i.e. no output
Expected behavior
I should be able to remove the store path.
nix-env --version
outputnix-env (Nix) 2.6.0
Additional context
Question posted on Discourse.
The text was updated successfully, but these errors were encountered: