Upgrade to 25.05 from 24.11 not working

I followed the steps in Upgrading NixOS

From the get go it seemed weird because the nix-channel --list | grep nixos didn’t give me anything. nix-channel --list only gave me home-manager and plasma-manager channels. sudo nix-channel --list did give me the 24.11 channel.

Steps I performed to upgrade:

  • nix-channel --add https://channels.nixos.org/nixos-25.05 nixos
  • nixos-rebuild switch --upgrade
  • After reboot /etc/os-realease shows 24.11 and pacakages that should’ve been upgraded are not
  • nix-channel --remove nixos
  • sudo nix-channel --add https://channels.nixos.org/nixos-25.05 nixos
  • nixos-rebuild switch --upgrade
  • After reboot /etc/os-realease shows 24.11 and pacakages that should’ve been upgraded are not
  • nix-channel --add https://channels.nixos.org/nixos-25.05 nixos
  • nixos-rebuild switch --upgrade
  • After reboot /etc/os-realease shows 24.11 and pacakages that should’ve been upgraded are not

So at this point I have…

> nix-channel --list                                                                                                             
home-manager https://github.com/nix-community/home-manager/archive/release-24.11.tar.gz
nixos https://channels.nixos.org/nixos-25.05
plasma-manager https://github.com/nix-community/plasma-manager/archive/trunk.tar.gz
> sudo nix-channel --list                                                                                                             
nixos https://channels.nixos.org/nixos-25.05

But nothing seems to have actually upgraded

Output of nixos-rebuild switch --upgrade --use-remote-sudo

unpacking 3 channels...
building Nix...
building the system configuration...
activating the configuration...
setting up /etc...
reloading user units for [myuser]...
restarting sysinit-reactivation.target
the following new units were started: run-credentials-systemd\x2dtmpfiles\x2dresetup.service.mount, sysinit-reactivation.target, systemd-tmpfiles-resetup.service

I assume you ran nixos-rebuild switch as root (with sudo)?

1 Like

That did it.

I hadn’t tried that cause day one of playing with NixOS I was curious about --use-remote-sudo and thought to try ‘’‘sudo nix-rebuild switch’‘’ and that threw a bunch of errors about missing binaries, environment variables, etc

So I just registered it as “OK, we don’t sudo with nix-rebuild”

The upgrade docs don’t use either sudo nor --use-remote-sudo though. Is my state normal or did I maybe make a mistake early on that caused this. My initial install on this machine was 24.11 only 2 weeks ago.

1 Like

There’s a note about exactly this in the manual BUT I think it’s not in the best place in the manual.

1 Like

Ah, this one?

I’m still not sure what that note means but only kinda understand what I think it means now that you pointed out my issue

Thanks

1 Like

Yes that’s the one I was thinking of. I think it needs to go earlier in the section!

1 Like