Can't reinstall Nix on OS X

I’ve tried this a few times, carefully going through everything I can find that might be around from Nix (following guides and GitHub issues), but this is still an issue for me: Re-installation issue on OS X · Issue #5566 · NixOS/nix · GitHub

Currently, this is what I get:

Can I use sudo?
[y/n] y

Yay! Thanks! Let's get going!

~~> Fixing any leftover Nix volume state
Before I try to install, I'll check for any existing Nix volume config
and ask for your permission to remove it (so that the installer can
start fresh). I'll also ask for permission to fix any issues I spot.

~~> Checking for artifacts of previous installs
Before I try to install, I'll check for signs Nix already is or has
been installed on this system.

---- oh no! --------------------------------------------------------------------
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:
 - Matrix: #nix:nixos.org
 - IRC: in #nixos on irc.libera.chat
 - twitter: @nixos_org
 - forum: https://discourse.nixos.org

It would be great if the installer emitted some information to indicate what might have been the issue. If there are any suggestions for doing a (semi)-manual install, I could try that as well.

Does the below information not indicate the issue and how to fix it?

It’s not clear how this relates back to the active-directory issue you linked, but the uninstall instructions cover a complete removal if you need: Installing a Binary Distribution - Nix Reference Manual

I have the same issue on Max OS Ventura (and have had it before Ventura as well). This information does not seem to fix the issue for me.

After running sudo mv /etc/bashrc.backup-before-nix /etc/bashrc and restarting my terminal the issue persists. I’ve also tried uninstalling Nix and that doesn’t help either.

Any insight is welcome.


Edit: Solved. For anyone struggling with this on a Mac: this may sound silly but go to Finder and check under Locations for any Nix-related stuff, then (force) eject them all.