7

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

How can I do it?

8

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.

| improve this answer | |
  • 1
    I don't think this would get everything, Doesn't the Nix install create users and run a daemon as well? – James McMahon Jan 22 '18 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. – DenisKolodin Jul 19 '19 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 Mar 16 at 15:15
  • 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 – James McMahon Apr 8 at 3:21

You must log in to answer this question.

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