
Vercel CLI’s --delete-project-after flag can now give new projects an expiry date when they are first deployed. Once that date arrives, Vercel deletes the project automatically.
It covers prototypes, demos and test apps that would otherwise remain in an account until someone removes them manually.
According to the Vercel changelog, the flag supports five fixed durations: 1h, 1d, 1w, 2w and 30d. The CLI also prints the date and time when the project will expire.
How --delete-project-after Works
Add the flag and a supported duration to vercel deploy. For example, vercel deploy --delete-project-after 1d creates a new project and schedules it for deletion after one day.
The setting applies to the project rather than a single deployment. When the expiry time arrives, the expired project is deleted automatically.
- 1
Deploy a new project
run vercel deploy with --delete-project-after and a supported duration
- 2
Check the deadline
read the expiry date and time printed by the CLI
- 3
Keep it if needed
run vercel project keep before the project expires
A project does not have to remain temporary. Running vercel project keep my-project removes its expiration, allowing the project to stay beyond the original deadline.
Existing Vercel Projects Are Not Changed
The flag only takes effect when vercel deploy creates a project. It cannot add or change an expiration on an existing project.
If the command targets an existing project while including --delete-project-after, the project’s expiration remains unchanged and the CLI prints a warning. To use automatic deletion, the expiry therefore needs to be set during the project’s first deployment.
Supported expiry periods range from one hour to 30 days. There is no custom duration described in the update, so the deployment command needs to use one of the five listed values.
Frequently asked questions
What is Vercel CLI project expiration?
Project expiration automatically deletes a new Vercel project after a duration set during its first CLI deployment. Builders set it with the --delete-project-after flag.
When is --delete-project-after available?
The flag is available through Vercel CLI. Supported durations are one hour, one day, one week, two weeks and 30 days.
Which Vercel plan includes project expiration?
The changelog does not state which plans include the feature or whether any plan restrictions apply.
Sources
3 checkedHow we cover tool news: Create With's tool desk drafts these reports with AI from the sources listed above and checks them against those sources before publishing.






