← Back
Vercel
Vercel Sandbox snapshots gain configurable retention, raising default limit from 7 to 30 days
Vercel · featuresdkapi · vercel.com ↗

Configurable Snapshot Retention

Vercel Sandbox snapshots now support flexible expiration settings, eliminating the previous hard limit of 7 days. This gives developers greater control over snapshot lifecycle management and aligns with longer-term development workflows.

Key Changes

  • Expiration range: Configure snapshots to expire between 1 day and infinity
  • New default: Snapshots now default to 30 days instead of 7 days
  • API support: Set expiration via the SDK using millisecond values (e.g., expiration: ms('14d'))
  • CLI support: Configure retention from the command line with --expiration flag

Implementation

SDK usage:

const sandbox = Sandbox.create();
sandbox.snapshot({ expiration: ms('1d') })

CLI usage:

# 14-day expiration
sandbox snapshot sb_1234567890 --stop --expiration 14d

# Never expire
sandbox snapshot sb_1234567890 --stop --expiration 0

What Developers Need to Know

This change is backward compatible—existing snapshot workflows continue to work with the new 30-day default. Developers relying on the previous 7-day retention should review and update their snapshot expiration settings if longer retention is desired. The flexibility to set expiration to infinity is useful for long-lived development environments and reference snapshots.