NixOS / nix

Nix, the purely functional package manager
https://nixos.org/
GNU Lesser General Public License v2.1
12.88k stars 1.53k forks source link

Reinstall doesnt work #7548

Open OmerBadihi opened 1 year ago

OmerBadihi commented 1 year ago

macOS - Mac mini 2018

i got this message and i did all the instructions, but it still doesnt work

I back up shell profile/rc scripts before I add Nix to them. I need to back up /etc/bashrc to /etc/bashrc.backup-before-nix, but the latter already exists.

Here's how to clean up the old backup file:

  1. Back up (copy) /etc/bashrc and /etc/bashrc.backup-before-nix to another location, just in case.

  2. Ensure /etc/bashrc.backup-before-nix does not have anything Nix-related in it. If it does, something is probably quite wrong. Please open an issue or get in touch immediately.

  3. Once you confirm /etc/bashrc is backed up and /etc/bashrc.backup-before-nix doesn't mention Nix, run: mv /etc/bashrc.backup-before-nix /etc/bashrc

We'd love to help if you need it.

You can open an issue at https://github.com/nixos/nix/issues

Or feel free to contact the team:

abathur commented 1 year ago

You'll have to follow the uninstall instructions before reinstalling it: https://nixos.org/manual/nix/stable/installation/installing-binary.html#macos

For future reference: If you are reinstalling because Nix was missing from your PATH after a macOS update, you don't have to reinstall to fix this. The macOS update is overwriting the shell hook, but you can just replace it. See #3616 for more.