Check out FlakeHub — the best place to discover and publish Nix flakes, from Determinate Systems.

We use a single, first-party analytics cookie to focus our limited time and energy on the most important documentation. Check out our privacy policy .

7. Uninstall Nix (if necessary)

Quick start / Uninstall Nix (if necessary)
Guide 7 of 8
In this guide

Cleanly remove Nix from your system

At the beginning of the Zero to Nix quick start, we installed Nix using the fast and stable Determinate Nix Installer, from Determinate Systems. We hope that your journey with Nix continues well into the future, but if you need to uninstall Nix for any reason you can do so with this command:

Uninstall Nix
/nix/nix-installer uninstall

Follow the prompts to approve the requested changes. Some of the changes that the installer requests:

  • Delete the directory tree under /nix
  • Delete the Nix CLI tool
  • Delete all Nix-specific users and groups
  • Delete the Nix configuration file at /etc/nix/nix.conf

Once the Determinate Nix Installer is done, you can verify that uninstallation has succeeded by confirming that directories like /nix and ~/.nix-profile have been removed from your system:

Verify that uninstallation has succeeded
ls /nix # error
ls ~/.nix-profile # error

Was this page helpful?