Created
July 20, 2023 11:18
-
-
Save thangchung/61122e25d2f277ca827c7ff79c3af02d to your computer and use it in GitHub Desktop.
Remove Nix in Multi-User (deamon)
This file contains hidden or 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/bash | |
# Uninstalling Multi-User Nix | |
# Check `sudo systemctl status nix-daemon.service` | |
# removed the (non-working) service configuration and shell configuration | |
sudo systemctl disable nix-daemon.socket | |
sudo systemctl disable nix-daemon.service | |
sudo systemctl daemon-reload | |
rm -rf ~/.nix-* | |
sudo bash -c 'rm -rf /root/.nix-*' | |
sudo mv /etc/bash.bashrc.backup-before-nix /etc/bash.bashrc | |
sudo rm /etc/bashrc /etc/zshrc | |
sudo rm /etc/profile.d/nix.sh | |
# removed the Nix files, users, and group | |
sudo rm -rf /nix /etc/nix | |
for i in {1..32} | |
do | |
sudo userdel nixbld$i | |
done | |
sudo groupdel nixbld |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment