NixOS - Updating and Upgrading
For some time now I have been looking for an interesting lightweight linux distribution that could replace Ubuntu.
I have NixOS running and now also made this note about updating and upgrading NixOS.
Configuration update
The following command will rebuild the system, activate the new generation immediately and make it the default boot option:
sudo nixos-rebuild switch
If you want to revert the changes then use the following command:
sudo nixos-rebuild switch --rollback
System update
With the --upgrade
option you can update the NixOS channel of the root user before building the configuration:
sudo nixos-rebuild boot --upgrade
Release upgrade
Make sure you read the release notes of the latest release. Sometimes there are instructions which need to be followed before upgrading the system.
You can check the current NixOS channel with the following command:
sudo nix-channel --list
Add the channel of the new release:
sudo nix-channel --add https://nixos.org/channels/nixos-VERSION nixos
Replace VERSION
with the new version for example: 23.05
Then update the channel en upgrade the system:
sudo nix-channel --update
sudo nixos-rebuild boot --upgrade
Read other notes
Tags
Notes mentioning this note
- NixOS - My Configuration and Switch to Podman
For some time now I have been looking for an interesting lightweight linux distribution that could replace Ubuntu
Comments
No comments found for this note.
Join the discussion for this note on this ticket. Comments appear on this page instantly.