Skip to main content
Flag cleanup scans your flags and connected repositories to find flags that are no longer in use. Each scan detects three kinds of stale flags—inactive flags, archived flags still referenced in code, and single variant flags—and can archive them or open cleanup pull requests automatically.
The Confidence home page also shows a Clean up your workspace card when any of your flags haven’t been applied in over a week. It’s a quick way to archive individual flags without running a full scan.

Run a Manual Scan

1

Go to Flag Cleanup

Select Flags > Cleanup in the sidebar.
2

Click Run scan

The scan analyzes your flags and any connected repositories. Results appear when the scan completes.
3

Review the results

Each row shows the flag name, the signal type (inactive, archived in code, or single variant), and any code references found.
  • For flags without code references, click Archive to archive the flag directly, or Dismiss to skip it.
  • For flags with code references, click Open PR to have a coding agent open a cleanup pull request in the affected repository.

Set a Scan Schedule

1

Go to Flag Cleanup

Select Flags > Cleanup in the sidebar.
2

Open Schedule settings

Click Schedule in the top right.
3

Set the frequency

Choose how often the scan runs—daily, weekly, or monthly—and click Save.
Scheduled scans run automatically at the configured interval. You can still run a manual scan at any time.

Enable Auto Archive

With auto archive enabled, Confidence automatically archives inactive flags that have no references in your connected repositories. You don’t need to review and manually archive each one.
1

Go to Flag Cleanup

Select Flags > Cleanup in the sidebar.
2

Open settings

Click Settings in the top right.
3

Turn on auto archive

Enable Auto archive inactive flags and click Save.
Auto archive only applies to inactive flags with no code references. Flags that are still referenced in code are never archived automatically—they appear in scan results for you to review.

Flag cleanup reference

Signal types, automatic archive, and cleanup pull requests explained

Archive a flag

Manually archive a flag that’s no longer needed

Flags reference

Flag schemas, variants, and lifecycle