nix Verified current stable Not installed? Version Control

Nix / Rollback Latest Action Default Profile

Rollback Latest Action Default Profile

Easily revert the last action in your default Nix profile with this command.

$
Terminal
nix profile rollback

When To Use

Reverting a recent change in the default Nix profile after an error.

Terminal Output

Expected runtime feedback

Simulated preview
>
Output
Rollback successful. The default profile has been reverted to the previous state.

You can now continue using your Nix environment without the last changes.

Command Breakdown

What each part is doing

nix
Base Command
The executable that performs this operation. Here it runs Nix before the shell applies any redirect operators.

How To Run

Execution path

  1. Step 1

    Open your terminal.

  2. Step 2

    Run the command: nix profile rollback.

  3. Step 3

    Verify the rollback was successful by checking your profile status.

Alternative Approaches

Comparable commands in other tools

Alternative version control tools for the same job.