How to upgrade packages

Unfortunately, using nix-env on NixOS is wrong in almost all cases. People still run into instructions to use nix-env by default, because it’s the first practical thing to encounter in the Nix manual.

I’m really sad to read that it has cost you so much time and caused such frustration. Sorry that I still didn’t manage to implement the change to the manual the Nix maintainer team has long approved. I’ll put some effort into it again after NixCon. Reorganise the Package Management chapter · Issue #7769 · NixOS/nix · GitHub

For a concrete solution attempt, you could check what takes precedence in your $PATH. May well be that the imperatively installed packages shadow the ones provided by NixOS.

1 Like