VercelVercel
'; user_status_content.firstChild.appendChild(avatarContainer); } else { // Placeholder for LoggedOutUserMenu let loggedOutContainer = document.createElement('div'); // if LoggedOutUserMenu fallback let userBtn = document.createElement('button'); userBtn.style.width = "33px"; userBtn.style.height = "33px"; userBtn.style.display = "flex"; userBtn.style.alignItems = "center"; userBtn.style.justifyContent = "center"; userBtn.style.color = "var(--ds-gray-900)"; userBtn.style.border = "1px solid var(--ds-gray-300)"; userBtn.style.borderRadius = "100%"; userBtn.style.cursor = "pointer"; userBtn.style.background = "transparent"; userBtn.style.padding = "0"; // user icon ( from geist) let svg = document.createElementNS('http://www.w3.org/2000/svg', 'svg'); svg.setAttribute('data-testid', 'geist-icon'); svg.setAttribute('height', '16'); svg.setAttribute('stroke-linejoin', 'round'); svg.setAttribute('style', 'color:currentColor'); svg.setAttribute('viewBox', '0 0 16 16'); svg.setAttribute('width', '16'); let path = document.createElementNS('http://www.w3.org/2000/svg', 'path'); path.setAttribute('fill-rule', 'evenodd'); path.setAttribute('clip-rule', 'evenodd'); path.setAttribute('d', 'M7.75 0C5.95507 0 4.5 1.45507 4.5 3.25V3.75C4.5 5.54493 5.95507 7 7.75 7H8.25C10.0449 7 11.5 5.54493 11.5 3.75V3.25C11.5 1.45507 10.0449 0 8.25 0H7.75ZM6 3.25C6 2.2835 6.7835 1.5 7.75 1.5H8.25C9.2165 1.5 10 2.2835 10 3.25V3.75C10 4.7165 9.2165 5.5 8.25 5.5H7.75C6.7835 5.5 6 4.7165 6 3.75V3.25ZM2.5 14.5V13.1709C3.31958 11.5377 4.99308 10.5 6.82945 10.5H9.17055C11.0069 10.5 12.6804 11.5377 13.5 13.1709V14.5H2.5ZM6.82945 9C4.35483 9 2.10604 10.4388 1.06903 12.6857L1 12.8353V13V15.25V16H1.75H14.25H15V15.25V13V12.8353L14.931 12.6857C13.894 10.4388 11.6452 9 9.17055 9H6.82945Z'); path.setAttribute('fill', 'currentColor'); svg.appendChild(path); userBtn.appendChild(svg); loggedOutContainer.appendChild(userBtn); loggedOutContainer.style.display = 'flex'; loggedOutContainer.style.gap = '8px'; loggedOutContainer.style.alignItems = 'center'; user_status_content.firstChild.appendChild(loggedOutContainer); } })();
Deployment Retention

Deployment Retention

Last updated December 17, 2025

Deployment Retention is available on all plans

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

For example, imagine you created a production deployment with a 60-day retention period on 01/01/2024 and later replaced it with a newer deployment. The origin deployment would expire on 03/01/2024, entering the recovery period, and users accessing it would see a 410 status code. If required, you could still restore it until 03/31/2024, when 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.

To configure a retention policy, open Settings in the sidebar of your project and follow these steps:

  1. Select Security on the side panel of the project settings page
  2. Scroll down to the Deployment Retention Policy section
  3. Select the drop down menu with the appropriate duration
  4. Save the new retention policy for your project

You can view your deployments retention policy using Vercel CLI and running the following command from your terminal:

terminal
vercel list [project-name] [--policy errored=6m]

Deployments older than the configured retention interval are not always deleted. Deployments will be kept while any of the following is true:

  • The deployment is one of the last 10 deployments created in the project.
  • The deployment is one of the last 20 production deployments in state Ready.
  • The deployment is one of the last 20 non-production deployments in state Ready.
  • The deployment has a production alias assigned to it.
  • The deployment is the target of a branch alias for a custom environment.
  • The deployment is a non-production deployment and has any custom alias assigned to it.

When a deployment is marked for deletion either accidentally or as part of the retention policy, you can restore it within the recovery period. This period is 30 days for successfully built deployments, but unsuccessful deployments may be garbage collected sooner.

To restore a deleted deployment, open Settings in the sidebar of your project:

  1. Select Security on the side panel of 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

Was this helpful?

supported.