How to get rid of home-manager?

I started with nixOS a few weeks ago and generally like it.
However, being new to it, home-manager was too much for me as I never got it to work properly.
Now I can’t get rid of it. I tried uninstalling it, but it does not help!

if I type the command: home-manager, it’s not found.
home-manager: command not found

BUT: it’s still in my system and I can’t get rid of it!

lrwxrwxrwx  1 f13r users   76 Apr 16 13:05 .bash_profile -> /nix/store/pdy7k1c1s4xks1mi12420yqnsdzhd976-home-manager-files/.bash_profile
lrwxrwxrwx  1 f13r users   70 Apr 16 13:05 .bashrc -> /nix/store/pdy7k1c1s4xks1mi12420yqnsdzhd976-home-manager-files/.bashrc
lrwxrwxrwx  1 f13r users   71 Apr 16 13:05 .profile -> /nix/store/pdy7k1c1s4xks1mi12420yqnsdzhd976-home-manager-files/.profile

Any help is highly appreciated!

1 Like

Did you delete the home-manager config? If not can try the following:

nix run home-manager/release-23.11 -- uninstall
4 Likes

thank you so much - this solved my issue!

1 Like

I got stuck on these error messages, and used the following as a workaround to remove it.

$ nix run home-manager/release-23.11 -- uninstall
error: experimental Nix feature 'nix-command' is disabled; add '--extra-experimental-features nix-command' to enable it
$
$ nix --extra-experimental-features nix-command run home-manager/release-24.05 -- uninstall
error: experimental Nix feature 'flakes' is disabled; add '--extra-experimental-features flakes' to enable it
$
$ nix --extra-experimental-features "nix-command flakes" run home-manager/release-24.05 -- uninstall
This will remove Home Manager from your system.
Really uninstall Home Manager? [y/n] y
Switching to empty Home Manager configuration...
...
...
...
Home Manager is uninstalled but your home.nix is left untouched.