# Nix Package Manager ## Add packages ```bash nix-env -iA nixpkgs. ``` # Nix Package Manager from Determinate Nix ## Add packages ```bash nix profile add nixpkgs#package-name ``` # NixOS ## Updating a Flake based system ```bash sudo nix update --flake /etc/nixos sudo nixos-rebuild switch ``` ## Updating a non-Flake based system ```bash sudo nixos-rebuild switch --upgrade ``` You can use `boot` instead of `switch` for the system to boot into the new generation on reboot instead.