Warning: name collision in input Nix expressions, skipping

I am new to NixOs but recently trying to learn I find some inconsistency that can be easily replicated and not sure how to fix.

If I run as a normal user
nix-channel --update nixos
and try to run
nix-env -u ‘*’
I am getting the below warning
warning: name collision in input Nix expressions, skipping ‘/home/mudrii/.nix-defexpr/channels_root/nixos’

mudrii@nixos ~ $ nix-env -u '*'
mudrii@nixos ~ $ nix-channel --update nixos
unpacking channels...
mudrii@nixos ~ $ nix-env -u '*'
warning: name collision in input Nix expressions, skipping '/home/mudrii/.nix-defexpr/channels_root/nixos'
mudrii@nixos ~ $ sudo nix-channel --list
nixos https://nixos.org/channels/nixos-unstable

Note: User was created in /etc/nixos/configuration.nix

Any Idea why " nix-channel --update nixos" causes “name collision in input Nix expressions” ?

https://nixos.org/nix-dev/2013-October/011898.html

probably you have added nixos channel as non-root user, and nix-env doesn’t know which nixos channel to use - root or non-root.

Try remove user nixos channel, as suggested in link.

Yes this was it
seems fixed the issue.

Thx for quick reply