How do I delete an individual deployment?

To delete an individual deployment, follow these steps:

  1. Go to the Project Overview page of the project where the specific deployment is located
  2. Click on the Deployments tab
  3. From the list of deployments, click on the deployment that you want to delete
  4. Click the More Options button (usually represented by three dots)
  5. Select Delete from the dropdown menu

Deployment retention refers to the configured policies that determine how long different types of deployments are kept before they are automatically deleted.

These configured retention policies allow you to control how long your deployment data is stored, providing:

  • Enhanced protection: Remove outdated deployments with potential vulnerabilities or sensitive data
  • Compliance support: Configure retention policies to align with your compliance requirements.
  • Efficient storage management: Automatically clear out unnecessary deployments

Vercel provides unlimited deployment retention for all deployments, regardless of the plan that you are on.

You can configure retention durations for the following deployment states:

  • Canceled deployments
  • Errored deployments
  • Preview deployments
  • Production deployments

The deployment lifecycle includes several stages from development to production:

1. Build: Code is compiled or prepared for execution.

2. Preview: Deployments are replicated in a production-like environment.

3. Production: Deployments are released to end-users.

4. Retention: After active use, deployments enter a retention phase based on the policies set, until they are marked as deleted. At this point the deployment will serve a 410 status code. Current production deployments are not removed under retention policies and become eligible for removal only after they are no longer active.

5. Recovery: A period of 30 days after a deployment was marked for deletion, during which the deployment can be restored back to its original state. After the recovery period has passed, a deployment can't be restored.

For illustration, consider a production deployment with a 60-day retention period created on 01/01/2024 and later replaced. It would expire on 03/01/2024, entering the recovery period, and serving a 410 status code. Restoration is possible until 03/31/2024, after which all associated resources are permanently removed and restoring the deployment is no longer possible.

Once a policy is enabled on a project, deployments within the retention period will start to be automatically marked for deletion, within a few days of enabling the policy.

This lifecycle ensures that resources are efficiently used and released

To configure a retention policy, navigate to the Settings tab of your project and follow these steps:

  • Select Security on the side panel of the project settings page
  • Scroll down to the Deployment Retention section
  • Select the drop down menu with the appropriate duration
  • Save the new retention policy for your project

In instances where deployments are marked for deletion either accidentally or as part of the retention policy, they can be restored within a 30 day recovery period.

To restore a deleted deployment, navigate to the Settings tab of your project:

  1. Select Security from the side panel on the project settings page
  2. Scroll down to the Recently Deleted section
  3. Find the deployment that needs to be restored and click on the dropdown menu item Restore
  4. Complete the modal

For more detailed information, refer to our documentation on Deployment Retention.

Couldn't find the guide you need?