# Rolling back

There is no rollback command, because rolling back is the same pointer flip as going live — and it is instant.

Because every version is an immutable manifest of immutable, content-addressed
files, no release ever overwrites another. Rolling back is just re-pointing the
site at an earlier one — the files are already there, so it takes effect
instantly with nothing to rebuild and nothing to re-upload.

Keeping a long history is nearly free: shared files are stored once, so you're
never charged twice for the same bytes.

There's no separate rollback command, because rolling back is the same operation
as going live: `deploy --to` points the site at a release. It takes a release
number, a tag, or a version-hash prefix.

```console title="roll back"
$ one9x pages deploy --site mysite --to v6
active version v7 → v6
✓ Live · nothing re-uploaded
```

## The one you want at 3am

An empty `--to ""` means the release before the active one:

```console title="undo the last deploy"
$ one9x pages deploy --site mysite --to ""
active version v9 → v8
✓ Live · nothing re-uploaded
```

That is the one you want when a deploy has just gone wrong and you don't want to
go looking up a number first.

## Rolling forward again

Nothing is lost by rolling back — the release you rolled away from is still
there, still staged, still at its own preview URL. Fix the problem, or just
point back at it:

```console title="forward"
$ one9x pages deploy --site mysite --to v9
✓ Live
```