# Rollbacks

How to put an earlier release live again, and what a rollback does not undo.


A rollback puts the image of an earlier release live again.

```bash
brewless rollback production
```

A rollback runs on the PHP version that release was built for, whatever `brewless.yml` says now.

Without a number this goes back to the release before the live one. To pick a specific release:

```bash
brewless rollback production --release=182
```

The client asks for confirmation first; `--force` skips the question.

## What a rollback does

The image of the earlier release runs again **as a new release**. Nothing is rebuilt, so a rollback is quick, and your release history stays a straight line: the rollback is the newest entry in it.

You can only go back to a release that served visitors at some point. A release that failed or was cancelled never has an image that is known to work. See [Release statuses](/reference/release-statuses).

## What a rollback does not do

> [!WARNING]
> The database is left as it is: nothing is migrated back. If releases after the one you go back to changed the database, its code has to work with that newer schema.

The console tells you before you confirm when later releases changed the database.

## Variables and brewless.yml

The rollback takes along the revision of your variables that the earlier release ran with, and what your `brewless.yml` asked of it: the sizes and scale of the containers, the scheduler, the queues and the release commands. Its release commands run again before it goes live. Variables you changed since stay in your Secret Manager as newer revisions; the next deploy takes the newest one again.
