Table of Contents

Normal rebuild:

sudo nixos-rebuild switch


Update the root user's channel named ‘nixos’ before rebuilding the system:

 sudo nix-channel --update

or

sudo nixos-rebuild switch --upgrade


Delete last 5 generations:

sudo nix-env --profile /nix/var/nix/profiles/system --delete-generations +5


Clear unused packages

sudo nix-collect-garbage -d



Back to Nixos Home