I installed Nix package manager, and now I would like to remove it completely.

How can I do it?


1 Answer 1


I asked myself the same question and searched the file system for Nix-related files. That's what I found:

# as user, remove:
rm -r ~/.nix-channels ~/.nix-defexpr ~/.nix-profile
# as root (sudo), remove:
sudo rm -r /nix
# edit the file ~/.profile and remove the line containing "added by Nix installer"

Not sure if I missed some files or directories. Also, I did not remove it myself, so be careful (and backup your data!) when removing stuff with sudo.

  • 1
    I don't think this would get everything, Doesn't the Nix install create users and run a daemon as well? Commented Jan 22, 2018 at 1:48
  • I would never have thought that the package manager can not delete itself normally! Even brew can. I cry. And will never install Nix again. Commented Jul 19, 2019 at 13:56
  • @JamesMcMahon Where did you get this info? I don't see any user creation nor daemon. According to the official doc, this answer is correct.
    – autra
    Commented Mar 16, 2020 at 15:15
  • 1
    It's been awhile, so memory is a little hazy and things could have evolved, but when I installed it on my Mac it definitely created users that I later went back and manually deleted. This uninstall script from 2019 also makes reference to users and a daemon, gist.github.com/expelledboy/c00aebb004b178cf78b2c9b344526ff6 Commented Apr 8, 2020 at 3:21

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .