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

Uninstall Nix on macOS: Can't Delete Nix Store Partition #6787

Closed
ibehnam opened this issue Jul 11, 2022 · 9 comments
Closed

Uninstall Nix on macOS: Can't Delete Nix Store Partition #6787

ibehnam opened this issue Jul 11, 2022 · 9 comments
Labels

Comments

@ibehnam
Copy link

ibehnam commented Jul 11, 2022

I've been following the official instructions to uninstall Nix on a Mac, but the final step—removing the Nix Store partition—throws an error.
Tried rm -rf /nix/ but I get:

rm: /nix//store: Permission denied
rm: /nix/: Resource busy

Also tried deleting the partition using Disk Utility but I get Failed to unmount “Nix Store” because it is currently in use.. Apparently process 0 (Kernel) is using it, so macOS won't let me unmount and delete the partition.

What can I do?

@ibehnam ibehnam added the bug label Jul 11, 2022
@abathur
Copy link
Member

abathur commented Jul 12, 2022

Not sure what instructions you're following, but the official instructions for uninstalling Nix on macOS (https://nixos.org/manual/nix/stable/installation/installing-binary.html#macos) don't list rm -rf /nix/ as a step.

@milosgajdos
Copy link

Uninstall instructions for macOS have somehow disappeared if there ever were any. The suggested link is also "half broken" - there is no macos acnhor anymore

@cole-h
Copy link
Member

cole-h commented Jun 18, 2023

https://nixos.org/manual/nix/stable/installation/uninstall.html#macos

@milosgajdos
Copy link

yeah I revers-engineered it, but thanks for sending the link; whoever will find this thread will find it useful :)

@abathur
Copy link
Member

abathur commented Jun 19, 2023

@fricklerhandwerk it sounds like the redirects for these old links aren't working?

@fricklerhandwerk
Copy link
Contributor

fricklerhandwerk commented Jun 19, 2023

The redirects work, but here the semantics changed because the uninstall part is now in its own section. For https://nixos.org/manual/nix/stable/installation/installing-binary.html#macos-installation indeed a redirect is missing because apparently the anchor changed from macos to macos-installation at some point. Would be great if you could fix that up. :)

@abathur
Copy link
Member

abathur commented Jun 19, 2023

So, the old links can't be redirected because of the resection?

Edit: I'm not sure I'm reading you right and I'm not familiar with the redirect system's capabilities to disambiguate. To clarify, can it redirect links from https://nixos.org/manual/nix/stable/installation/installing-binary.html#macos to https://nixos.org/manual/nix/stable/installation/uninstall.html#macos? (I'm not worried about mapping them to https://nixos.org/manual/nix/stable/installation/installing-binary.html#macos-installation.)

@fricklerhandwerk
Copy link
Contributor

So, the old links can't be redirected because of the resection?

I thought so, but actually installing.html#macos was pointing to the uninstall section, so it can be redirected cleanly. I was under the wrong impression the uninstall instructions were somehow nested under installation without addressable subsections. My previous comment was wrong.

To clarify, can it redirect links from https://nixos.org/manual/nix/stable/installation/installing-binary.html#macos to https://nixos.org/manual/nix/stable/installation/uninstall.html#macos?

Yes, that is correct and can be done. Check the sample in the PR you linked previously.

@Alvaro-R
Copy link

Alvaro-R commented Oct 6, 2023

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

6 participants