`nix upgrade-nix` fails with mysterious error

When I try to update Nix itself on a non-NixOS system (Linux in this case), I get this error:

$ nix upgrade-nix
error: directory '/home/cv/.nix-profile/bin' does not appear to be part of a Nix profile

Which makes no sense:

$ readlink -q ~/.nix-profile
/nix/var/nix/profiles/per-user/cv/profile

How much more of a profile can this be?

1 Like

Look at `nix upgrade-nix` is broken · Issue #5473 · NixOS/nix · GitHub for potential workaround