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.
vercel flags list --state activevercel flags inspect old-onboarding-flowCheck 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:
rg "old-onboarding-flow" --type ts
rg "oldOnboardingFlow" --type tsDelete the flag() declaration from your flags.ts file.
Keep only the code path that was behind the enabled flag:
const show = await oldOnboardingFlow();
return show ? <NewOnboarding /> : <OldOnboarding />;return <NewOnboarding />;Delete any component files that are no longer referenced.
vercel deployVisit the preview URL to confirm the feature still works without the flag.
Once archived, the flag stops evaluating and your application falls back to the decide default defined in code.
vercel flags archive old-onboarding-flow --yesSee Archive for details on what happens when you archive.
vercel deploy --prodWas this helpful?