Skip to content
Docs

Cleaning up after a full rollout

Once a feature is stable and the flag has been enabled in all environments for a while, remove it from your codebase and dashboard.

terminal
vercel flags list --state active
terminal
vercel flags inspect old-onboarding-flow

Check the output to confirm the flag is enabled in all environments and hasn't been changed recently.

Search your codebase for the flag key and its camelCase variant:

terminal
rg "old-onboarding-flow" --type ts
rg "oldOnboardingFlow" --type ts

Delete the flag() declaration from your flags.ts file.

Keep only the code path that was behind the enabled flag:

Before
const show = await oldOnboardingFlow();
return show ? <NewOnboarding /> : <OldOnboarding />;
After
return <NewOnboarding />;

Delete any component files that are no longer referenced.

terminal
vercel deploy

Visit the preview URL to confirm the feature still works without the flag.

terminal
vercel deploy --prod

Archived flags evaluate to the default value defined in code, so remove the flag from your code and deploy to every environment that uses it before archiving.

Once the code removal is live in every environment, archive the flag:

terminal
vercel flags archive old-onboarding-flow

The command reports evaluations from the last 3 days before asking for confirmation. If you need the flag back, vercel flags unarchive old-onboarding-flow restores it with its configuration and history.

See Archive for details on what happens when you archive.

Last updated February 24, 2026

Was this helpful?

supported.