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

Cannot delete path ... since it is still alive. To find out why, use: nix-store --query --roots, but nix-store --query --roots shows nothing #166477

Closed
ghost opened this issue Mar 30, 2022 · 2 comments
Labels
0.kind: bug Something is broken

Comments

@ghost
Copy link

ghost commented Mar 30, 2022

Describe the bug

Recently, I needed to forcibly rebuild a derivation output. I attempted to delete the old output:

$ nix-store --delete /nix/store/i9qmw2r3d78lma985g7qzipdmqv8jd5d-stdenv-bootstrap-tools-mips64el-linux-gnuabi64
finding garbage collector roots...
0 store paths deleted, 0.00 MiB freed
error: Cannot delete path '/nix/store/i9qmw2r3d78lma985g7qzipdmqv8jd5d-stdenv-bootstrap-tools-mips64el-linux-gnuabi64' since it is still alive. To find out why, use: nix-store --query --roots

After following nix-store's advice, I got:

$ nix-store --query --roots /nix/store/i9qmw2r3d78lma985g7qzipdmqv8jd5d-stdenv-bootstrap-tools-mips64el-linux-gnuabi64
$

Steps To Reproduce

Steps to reproduce the behavior:

This has happened to me a couple of times, but I don't know how to reproduce it, short of shipping you a complete tarball of my /nix/store (and possibly other parts of my system as well).

Expected behavior

A clear and concise description of what you expected to happen.

Either /nix/store/i9qmw2r3d78lma985g7qzipdmqv8jd5d-stdenv-bootstrap-tools-mips64el-linux-gnuabi64 gets deleted, or nix-store --query --roots shows me something that references it, or else the tools print additional instructions for the user.

Screenshots

See above.

Additional context

I do feel like I might be abusing the issue tracker here to get technical support. If so, I will make amends by submitting a PR to improve the documentation and/or error messages printed by nix-store.

Notify maintainers

Metadata

Please run nix-shell -p nix-info --run "nix-info -m" and paste the result.

 - system: `"x86_64-linux"`
 - host os: `Linux 5.10.10+, Debian GNU/Linux, 10 (buster)`
 - multi-user?: `no`
 - sandbox: `no`
 - version: `nix-env (Nix) 2.5.0pre20211206_d1aaa7e`
 - nixpkgs: `/nix/nixpkgs`
@ghost ghost added the 0.kind: bug Something is broken label Mar 30, 2022
@Artturin
Copy link
Member

NixOS/nix#6141

@ghost
Copy link
Author

ghost commented Mar 31, 2022

Ok! At least I'm in good company :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0.kind: bug Something is broken
Projects
None yet
Development

No branches or pull requests

1 participant