I've installed Nix into an Ubuntu WSL installation. I now want to uninstall it.
The manual states to simply "rm -rf /nix
".
Nix adds itself to $PATH and the manual makes mention of a Nix daemon.
Surely there are other parts of my system that Nix has added itself to.
For one, I can see an entry in ~/.profile
which is sourcing ~/.nix-profile/etc/profile.d/nix.sh
Is there anything else that needs to be done?
Installation. To install Nix, run curl -L https://nixos.org/nix/install | sh as a non-root user and follow the instructions. Alternatively, you may prefer to download the installation script and verify its integrity using GPG signatures. Instructions for doing so can be found here: https://nixos.org/nix/download.html.
To uninstall a package, remove it from the pkg list in the configuration. nix file: environment. systemPackages = with pkgs; [ wget vim nano zsh file ];
Description. The command nix-shell will build the dependencies of the specified derivation, but not the derivation itself. It will then start an interactive shell in which all environment variables defined by the derivation path have been set to their corresponding values, and the script $stdenv/setup has been sourced.
NOTE: This answer is about uninstalling Nix from a Linux or Linux-like system in 2018. Since then, Nix has started to support systemd unit installations and since Catalina, macOS installations have become more complex too. This answer is not official documentation.
The "curl | sh
" installer for Nix on Linux does not install the Nix daemon, so the only things to delete are /nix
, the line in ~/.profile
and ~/.nix-profile
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With