nix icon indicating copy to clipboard operation
nix copied to clipboard

/etc/bash.bashrc.backup-before-nix contains NIX information

Open VanessaPC opened this issue 3 years ago • 2 comments

Describe the bug

According to the instructions I am getting on failure I get:

  1. 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.

However,the files contains this lines

# Nix
if [ -e '/nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh' ]; then
  . '/nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh'
fi
# End Nix

Steps To Reproduce

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior

A clear and concise description of what you expected to happen.

nix-env --version output

Additional context

Add any other context about the problem here.

VanessaPC avatar Sep 20 '22 10:09 VanessaPC

It's a sign nix was installed before the backups were taken, so you may need to clean it up manually.

I'd try:

  1. Run grep "End Nix" /etc/* and manually remove those lines from any matching files that don't have the backup-before-nix extension.
  2. Remove all of the files with the backup-before-nix extension.
  3. Follow the remaining appropriate macOS/Linux uninstall instructions before reinstalling it: https://nixos.org/manual/nix/stable/installation/installing-binary.html#uninstalling

abathur avatar Sep 20 '22 13:09 abathur

Thank you.

I did that, as well as uninstalling from mac, it then worked.

VanessaPC avatar Sep 21 '22 07:09 VanessaPC