Restoring previous flag versions
Overview
This topic explains how to use the change history tab to restore a feature flag to a previous version.
Flag versions in change history
You can change a feature flag to a previous version.
Versions increment based on your actions. For example, if you are on version 5 and restore version 3, version 3 is brought forward and becomes version 6. The restore workflow shows version numbers, code diffs, and a preview of the new version. You cannot restore a version that is identical to the current version. If you try to restore an identical version, the diff is abbreviated to only show the updated timestamps and version numbers, and restoring is disabled.
To restore a previous version, visit the change history page.
Limitations
Flag versions are limited to flag configuration changes in the current environment, not flag variations or global flag settings. There are additional restrictions if a flag is part an experiment, rollout, or scheduled change. Here is a list of limitations for restoring previous flag versions:
- You can only restore states that existed within the last 30 days
- You can’t restore a version with an expired target date. For example, if the current date is June 1, 2026 and you attempt to restore a version that had a change scheduled to take effect on May 25, 2026, you cannot restore this version because the date of the scheduled change has already passed.
- You can’t roll back to states controlled by experiments, guarded rollouts, or progressive rollouts
Restore a previous flag version
Here’s how to restore a previous flag version:
- Navigate to the flag’s change history page and find the version you want to restore. Versions that can be restored are indicated with a button that has “Restore previous version” hover text.
- Click the version restore button in the row for the version you wish to restore. A code diff appears showing the changes between the current version and the version you intend to restore.
- Verify that the changed version does what you expect and click Stage this version. A preview appears.
- Click Review and save. A confirmation dialog appears.
- Type the environment’s name to confirm and click Save changes.
The earlier flag version is now the current version.