Holochain Forum

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.