Home Explore Blog Models CI



nix

1st chunk of `src/nix/profile-rollback.md`
8f76a5f5311389b5c6ce192a979a02a0b15f2593f9769d330000000100000230
R""(

# Examples

* Roll back your default profile to the previous version:

  ```console
  # nix profile rollback
  switching profile from version 519 to 518
  ```

* Switch your default profile to version 510:

  ```console
  # nix profile rollback --to 510
  switching profile from version 518 to 510
  ```

# Description

This command switches a profile to the most recent version older
than the currently active version, or if `--to` *N* is given, to
version *N* of the profile. To see the available versions of a
profile, use `nix profile history`.

)""

Title: Nix Profile Rollback Command
Summary
The `nix profile rollback` command allows users to switch a Nix profile to an older version. By default, it reverts to the most recent version prior to the current one. Alternatively, the `--to N` option can be used to switch to a specific version *N*. To inspect available profile versions, the `nix profile history` command should be used. The text provides examples for rolling back to the immediately previous version and to a specified version.