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

NixOS install/uninstall on MacOS is broken #2295

Open
pjgoodall opened this issue Jul 17, 2018 · 7 comments
Open

NixOS install/uninstall on MacOS is broken #2295

pjgoodall opened this issue Jul 17, 2018 · 7 comments

Comments

@pjgoodall
Copy link

pjgoodall commented Jul 17, 2018

Hello,

Sorry to report - the whole install/uninstall on current MacOS (High Sierra) seems to be broken. I've just tried installing a single-user Nix-OS so I could use Nix-ENV, using bash <(curl https://nixos.org/nix/install). I'm sure it installed a multi-user environment. Unfortunately I now have no idea how to uninstall it. As a newbie I have no chance of reversing the install to test it and give better information here.

The manual says -> You can uninstall Nix simply by running rm -rf /nix; which is demonstrably wrong.

There are many issues/tickets referring to uninstall or its associated documentation, and many hints in their comments - usually followed by someone pointing out something that may have been missed.

Please can someone involved with developing the install processes make sure that any install scripts can uninstall - leaving a clean system. Surely this is in the spirit of NixOS.

I'm very fond of Nix and how it is supposed to go about its business, and appreciate all the work that is going into it. It may seem minor, but fixing this issue would sure help increase adoption of NixOS - and we'd all be very grateful :-).

Regards,
--PG

@pjgoodall pjgoodall changed the title NixOS install/uninstall on MacOS is a 'Dog's Breakfast' NixOS install/uninstall on MacOS is broken Jul 24, 2018
@2mol
Copy link

2mol commented Jul 28, 2018

Same here. So first of all, looking at my .bash_history it seems that sudo rm -rf /etc/nix /nix /var/root/.nix-profile /var/root/.nix-defexpr /var/root/.nix-channels /Users/<username>/.nix-profile /Users/<username>/.nix-defexpr /Users/<username>/.nix-channels did the trick for me.

As to the fact that nix doesn't work in the first place, I managed to track down the issue to the fact that the ~/.nix-profile symlink was broken, pointing to the non-existing /nix/var/nix/profiles/per-user/<username>/profile.

You can try ln -s /nix/var/nix/profiles/default /nix/var/nix/profiles/per-user/<username>/profile. It will make some magic happen though, for me nix seems to have changed the symlink to something actually user-specific, which is great.

FInally, I made sure that ~/.nix-profile/bin was in my PATH (PATH="~/.nix-profile/bin:$PATH" in your .bash_profile), not sure if that step is how it's meant to be done.

So in hindsight it seems like a fairly minor issue, pinging @grahamc in case the above information is useful for fixing the install script.

@takeda
Copy link

takeda commented Aug 4, 2018

I believe there's a bit more than that. There's also nix daemon and nixbld users.

I def think an uninstallation script is needed.

@stale
Copy link

stale bot commented Feb 23, 2021

I marked this as stale due to inactivity. → More info

@stale stale bot added the stale label Feb 23, 2021
@nixos-discourse
Copy link

This issue has been mentioned on NixOS Discourse. There might be relevant details there:

https://discourse.nixos.org/t/anyone-up-for-picking-at-some-nix-onboarding-improvements/13152/6

@stale
Copy link

stale bot commented Jan 8, 2022

I marked this as stale due to inactivity. → More info

@stale stale bot added the stale label Jan 8, 2022
@benkeil
Copy link

benkeil commented Jan 20, 2022

It's really disappointing that there is no progress.

@stale stale bot removed the stale label Jan 20, 2022
@stale stale bot added the stale label Aug 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants