Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ixmatus/c32a8f8703ea355e5ca3e83edb781da0 to your computer and use it in GitHub Desktop.
Save ixmatus/c32a8f8703ea355e5ca3e83edb781da0 to your computer and use it in GitHub Desktop.
Instructions to delete Nix-1.11.13 from a Darwin system
Uninstalling nix:
1. Delete /Library/LaunchDaemons/org.nixos.nix-daemon.plist
sudo launchctl unload /Library/LaunchDaemons/org.nixos.nix-daemon.plist
sudo rm /Library/LaunchDaemons/org.nixos.nix-daemon.plist
2. Restore /etc/profile.backup-before-nix back to /etc/profile
sudo mv /etc/profile.backup-before-nix /etc/profile
(after this one, you may need to re-open any terminals that were
opened while it existed.)
3. Restore /etc/bashrc.backup-before-nix back to /etc/bashrc
sudo mv /etc/bashrc.backup-before-nix /etc/bashrc
(after this one, you may need to re-open any terminals that were
opened while it existed.)
4. Restore /etc/zshrc.backup-before-nix back to /etc/zshrc
sudo mv /etc/zshrc.backup-before-nix /etc/zshrc
(after this one, you may need to re-open any terminals that were
opened while it existed.)
5. Delete the files Nix added to your system:
sudo rm -rf /etc/nix /nix /var/root/.nix-profile /var/root/.nix-defexpr /var/root/.nix-channels /Users/$USER/.nix-profile /Users/$USER/.nix-defexpr /Users/$USER/.nix-channels
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment