> ## Documentation Index
> Fetch the complete documentation index at: https://developers.telnyx.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Versions & Rollback

> Every successful ship produces an immutable revision. revisions list shows a function's deploy history; rollback instantly retargets traffic to a previous revision — no rebuild, no re-upload.

Every successful `telnyx-edge ship` produces an immutable revision. `telnyx-edge revisions list` shows a function's deploy history; `telnyx-edge rollback` retargets traffic to a previous revision without rebuilding or re-uploading anything.

## Listing revisions

```bash theme={null}
telnyx-edge revisions list my-func
```

Prints the most recent revisions, newest first: the revision ID, when it was shipped, who shipped it, and its deploy status. The revision currently serving traffic is marked with `*`.

Revision IDs are short identifiers like `a1b2c3d` — you pass one to `rollback`.

## Rolling back

```bash theme={null}
telnyx-edge rollback my-func a1b2c3d
# → Rollback of 'my-func' to revision a1b2c3d accepted; traffic is switching across clusters.
#   Run 'telnyx-edge revisions list my-func' to confirm the active revision.
```

Traffic is instantly retargeted to the existing, immutable revision across all clusters — there is no rebuild and no re-upload. Two constraints:

* **The target must have reached `deploy_ok`.** A revision whose build or deploy failed never served traffic and can't be rolled back to; `revisions list` shows each revision's deploy status.
* **Rollback doesn't touch your source.** Your working tree and git history are unchanged. The next `ship` deploys whatever is on disk — as a new revision — regardless of which revision is currently active.

## Rolling forward

To move forward again, either `ship` — every successful ship creates a new revision and moves traffic to it — or `rollback` to any other revision that reached `deploy_ok`.

## Recovering a failed function

Rollback assumes the function has a healthy revision to return to. A function stuck in a terminal failure state (`build_failed`, `deploy_failed`, `delete_failed`) can instead be reset:

```bash theme={null}
telnyx-edge reset-func broken-func
```

This tears down the function's deployed resources and returns it to the `created` state — preserving its ID, name, and config — so you can fix the code and `ship` again. A healthy function (`build_ok`/`deploy_ok`) can't be reset; use `delete-func` if you want it gone.

## Next Steps

* [CI/CD](/docs/edge-compute/deploy) — ship from a pipeline; rollback is your escape hatch
* [Routes & Domains](/docs/edge-compute/configuration/routing) — the function URL always points at the active revision
* [CLI reference](/docs/edge-compute/reference/cli) — `ship`, `revisions`, `rollback`, and `reset-func` in full
