Uninstall nix

I wanted to uninstall nix, to try again with a fresh install. After reading a few things, here is what I did to remove nix:

rm -rf .nix-*
rm -rf .cache/nix/
sudo rm -rf /nix

Just the last line is what the nix docs recommend, and that’s probably fine, if you’d rather keep your caches and configuration.

4 Likes

That’s helpful, thanks for posting.

When I do as you did, I end up with these messages:

rm: /nix/.Spotlight-V100: Operation not permitted
rm: /nix/.Trashes: Operation not permitted
rm: /nix/.DocumentRevisions-V100: Operation not permitted
rm: /nix/.TemporaryItems: Operation not permitted

And when I then cancel the process, this additional message shows up:

rm: /nix: Resource busy

I just googled that and came up with this as the first result, did you try it already?

probably need to sudo to delete /nix

I followed the instructions in that thread and somehow got everything uninstalled, at least as far as I can tell. So thank you!

@thedavidmeister You mean sudo in front of the first/second command that @harlan shared?

i get: “rm: /nix: Read-only file system”

why is nix so important?

I will get a new comp and Linux if yall feel that is whats necessary / recommended

nix is a single dependency that, when you get it setup, handles all the other dependencies based on a configuration file that we maintain

that’s how we’re supporting other people’s development environments, but it’s not mandatory

if you want to not use nix you need to maintain your own versions of rust etc.

1 Like

the /nix in the root is the one i was talking about, the others are relative paths

1 Like

Plus I think it may have been on one of the youtube videos I heard @marycamacho say it was because it enables providing known levels of service for the holo hosting.

1 Like

yes, and even more than this, it gives developers of happs the same working environment that the holo hosts use, down to hashed versions of all the dependencies - although there are some practical limits to this, e.g. mac and linux are going to have differences, but yeah it’s as close as we know how to get it :slight_smile:

2 Likes

OK so I’m on MacOS Catalina 10.15.7 and just managed to uninstall nix.

After getting into the issues of

I erased the volume in Disk Utility and followed

Which says:

1. look in /etc/synthetic.conf
    * if the file is absent or nix isn't mentioned in it, move to 2
    * if nix is the only thing present, you can remove it: sudo rm /etc/synthetic.conf
    * if other things are also present, you'll need to manually edit it out
2. reboot in order to nudge the system to remove the empty /nix directory

nix was the only thing present in the file so removed the file then rebooted and /nix was gone

HTH

sbp

Oh, I missed a bit it seems, I opened up Disk Utility again and it was there greyed out cos I guess I just erased it previously not deleted. So I deleted it and it’s gone, so now when I type:

  • diskutil list

It isn’t there.

Hi all, I’ve been getting error messages with nix lately on Mac OS Big Sur. I updated to the updated version of Big Sur, and it loaded my entire hard drive on Nix, instead of my normal hard drive. It said I couldn’t load on my hard drive. I have no clue what to do, as I used nix a while back on working on Holochain and now don’t need it. Is anyone else having this problem?

How do I go about uninstalling nix if it’s my startup disk at the moment?

Thanks!

Hi @kamal :slight_smile:

Question, what do you mean with loading nix in your entire hard drive? Did you remove MacOS from it?

Hi @guillemcordoba - good to hear from you!

I didn’t choose anything specifically. I’ve been getting nix errors with Big Sur, even though I’m not using Nix for anything right now. I’ll try to record the error if i see it again.

When I did a routine system update on my mac to Big Sur 11.5 & then 6 it basically said I couldn’t use my main HD. I could only load the new update on my nix. Luckily, I just relaunched my startup disk to my normal HD and it loaded correctly, updated correctly and all. So I’m no longer on Nix as my startup disk. - phew!

Now I’d like to get Nix off my computer, so I think i just have to perform an uninstall. I found directions how to do it and will try. If I run into issues, I’ll write back, so I think i’m good. for now on this. Thank you!

Next, I need to get my Holoport+ running, so far 2 unsuccessful attempts! :frowning:

But will get there!!

Kamal

1 Like

is this nixos or nix shell?

i’m surprised to hear that nix shell would be giving such problems