Skip to content

Instantly share code, notes, and snippets.

Created August 10, 2017 14:04
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save anonymous/16ed2da5bbf86866a321eee3f6e91586 to your computer and use it in GitHub Desktop.
Save anonymous/16ed2da5bbf86866a321eee3f6e91586 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