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

# Deleting flags

<View title="Developer" />

<View title="Federal docs" />

<View title="EU docs" />

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 and restoring flags](/docs/home/flags/archive).

## 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.

<Danger>
  **Deleted flags are gone forever**

  You cannot restore a deleted flag. Make sure your team no longer needs the flag before you delete it.
</Danger>

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:

1. In the left sidebar, click **Code**. The CodeControl menu appears.
2. Click **Flags**.
3. Click **Filters**. In the "Lifecycle" section, click **Archived**. The archived flags list appears.
4. Click a flag name to open the flag you wish to delete.
5. Click the **three-dot** overflow menu in the right sidebar.
6. Select **Delete**. The "Delete this flag?" dialog appears.
7. Enter the flag's name or key in the **Confirm** field.
8. Click **Delete**.

The flag is permanently deleted.

<Card icon="https://mintcdn.com/launchdarkly/YIC2H8XW-fomhquw/assets/icons/openapi-logo.svg?fit=max&auto=format&n=YIC2H8XW-fomhquw&q=85&s=dd9578a9668a86e1a8b8c314921f204c" horizontal width="2500" height="2452" data-path="assets/icons/openapi-logo.svg">
  You can also use the REST API: [Delete feature flag](/docs/api/feature-flags/delete-feature-flag)
</Card>
