Last active
September 14, 2022 13:08
-
-
Save didmar/5528be415377c5656db03a4e8c3b5999 to your computer and use it in GitHub Desktop.
Script to uninstall Nix from Ubuntu, tested with Ubuntu 22.04
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# Uninstall Nix, tested with Ubuntu 22.04 | |
# For your .bashrc and .zshrc, manually edit them to remove Nix related lines | |
for i in {1..32}; do sudo userdel nixbld${i}; done | |
sudo groupdel nixbld | |
sudo rm -rf /etc/nix /nix /var/root/.nix-profile /var/root/.nix-defexpr /var/root/.nix-channels \ | |
~/.nix-profile ~/.nix-defexpr ~/.nix-channels /etc/systemd/system/nix-daemon.service \ | |
/etc/systemd/system/nix-daemon.socket /etc/bash.bashrc.backup-before-nix /etc/zsh/zshrc.backup-before-nix |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment