When you are finished with a Feature Flag, it's best practice to remove it to keep your Flags and application organised and tidy. This topic describes how to delete a Feature Flag on the Harness Platform and using Git.
Make sure you are ready to delete the Flag from all of your Environments. When you delete a Flag on the Harness Platform or on Git, it is removed from all Environments.
Delete a Flag using the Harness Platform
- In Harness, go to Feature Flags, then to the Flag you want to delete.
- Click more options (**︙**)next to the flag that you want to delete, then click Delete.
Figure 1: Delete a Flag
- In Delete Flag, click Delete.
Delete a Flag using Git
If you have set up Git Experience to manage your Flags via a
.yaml file on Git, you can delete Flags from there. To do this:
- Go to the
.yamlfile where you manage your Feature Flags.
- Find the Flag you want to delete.
- Delete the
- flagobject. For example, the following highlighted section would be deleted for the Flag called
Figure 2: Sample YAML file with the Flag object highlighted