Vercel Blob now supports TTLs for automatic deletion
Vercel Blob introduces time-to-live settings to automatically delete stored files after a set period, streamlining cleanup for temporary data.
Vercel Blob now allows users to set automatic deletion schedules for stored files by specifying a time-to-live (TTL) in days at upload. The feature supports durations from 1 to 730 days, with the countdown beginning immediately after the file is uploaded. This eliminates the need for manual deletion of temporary files such as session transcripts, exports, or temporary uploads, reducing administrative overhead. The TTL applies uniformly across all upload methods, including put(), copy(), putImage(), multipart uploads, and presigned URLs.
Each write operation and head() request now returns an expiresAt field, providing clear visibility into when a blob is scheduled for deletion. Existing blobs can have their TTL adjusted or removed entirely using the setTtl() method, either individually or in batches of up to 1,000 URLs without requiring re-uploading. The Vercel CLI version 65.16.0 and later supports these operations through dedicated flags like --ttl-days for uploads and set-ttl for existing blobs.
The introduction of TTLs incurs an additional cost of one Advanced Operation per started 60-day period, on top of standard write operations. For example, a 7-day TTL counts as one operation, while the maximum 730-day TTL costs 13 operations. Clearing a TTL or performing deletions does not incur extra charges, ensuring cost efficiency for users who need to adjust retention policies.
Users can monitor TTL-related operations through the Blob section under the Observability tab in the Vercel dashboard. This integration provides transparency and control over automatic deletion processes, aligning with best practices for managing temporary or sensitive data.