# Versions and rollback

Every deploy is stored as a git commit in Percher's internal Forgejo instance. List versions and roll back to any previous deploy:

```sh
# List all versions
bunx percher versions
# e950cff  deploy: dep_850j...  2026-04-16
# 867d57f  Initial commit       2026-04-16

# Roll back to a specific version
bunx percher rollback e950cff

# No sha handy? Bare rollback lists the 5 most recent versions and lets you pick
bunx percher rollback

# Or let the server pick the most recent version that went live without crash-looping
bunx percher rollback --last-good
```

Rollback reuses the kept image for versions inside your plan's rollback retention (see [History and retention](/docs/retention)). An older version is refused with `ROLLBACK_TARGET_UNSUPPORTED` unless you add `--rebuild`, which builds it again from its source with today's dependencies, so the result can differ from what originally shipped. You can also roll back from the Publishes tab in the dashboard.

Env vars are not rolled back; the current values stay.

Full guide: https://percher.app/docs/versions
