Deleting flags
Overview
This topic explains how to permanently delete flags that are already archived.
Deleting a flag removes it from all environments and deletes its targeting rules. If you are not sure whether to remove a flag, archive it instead. To learn more, read Archiving flags.
Delete archived flags
After you archive a flag, you can delete it when you no longer need it.
When you delete a flag, LaunchDarkly removes its targeting rules. If the flag is requested again, the fallback value defined in code is returned for all contexts. Before you delete a flag, remove any references to it from your application code.
Deleted flags are gone forever
You cannot restore a deleted flag. Make sure your team no longer needs the flag before you delete it.
Many teams archive flags first, then delete them after cleanup is complete. Archiving keeps a flag available for reference, while deleting permanently removes it from LaunchDarkly and the REST API.
To delete an archived flag:
- Navigate to the Flags list.
- Click Filters. In the “Lifecycle” section, click Archived. The archived flags list appears.
- Hover on the flag you want to delete, then click its three-dot overflow menu.
- Click Manage flag settings. The flag’s Settings tab appears.
- In the Delete flag section, click Delete this flag. The “Delete this flag?” dialog appears.
- Enter the flag’s name or key in the Confirm field.
- Click Delete.
The flag is permanently deleted.
You can also use the REST API: Delete feature flag