Vercel CLI can now set a new project to delete itself. Add --delete-project-after and a duration to vercel deploy, and Vercel deletes the project when that time is up. The CLI is Vercel’s command-line tool for deploying from your terminal, and this needs version 65.12.0 or later.
Vercel says the feature is meant for prototypes, demos and test apps, so you do not have to clean them up by hand. This command creates a project that expires in a day:
vercel deploy --delete-project-after 1d
The supported durations are 1h, 1d, 1w, 2w and 30d. The CLI prints the date and time the project will expire.
The whole project is deleted
Expiration deletes the project itself, not just a deployment. If you might revisit a throwaway client demo, copy what you need from it before the timer runs out.
The flag only works when vercel deploy creates the project. On a project that already exists, it does nothing except print a warning.
Cancelling the timer
If a prototype turns into something real, remove the expiration with vercel project keep and the project name:
vercel project keep my-project
If a coding agent runs Vercel CLI for you, check the deploy command it uses. The timer only starts when the flag is on the command that creates the project.
End of article