Home Explore Blog CI



nix

src/nix/profile-rollback.md
1d33b452f5ddffe51974232986edae6cd57472940441c8240000000300000230
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`.

)""

Chunks
cc0d100c (1st chunk of `src/nix/profile-rollback.md`)
Title: nix profile rollback: Usage and Description
Summary
The `nix profile rollback` command allows switching a profile to a previous version. Without the `--to` flag, it reverts to the immediately preceding version. With `--to N`, it switches to version N. Use `nix profile history` to view available profile versions.