Vercel Blob can now delete blobs automatically. Pass ttlDays when you write a blob and it is deleted that many days after upload, from 1 to 730 days. The TTL counts from the blob's upload date.
Use TTLs for blobs you would otherwise delete yourself, such as session transcripts, exports, and temporary uploads.
ttlDays works on put(), copy(), putImage(), multipart uploads, and presigned upload URLs. Every write result and head() response now includes expiresAt, so you know when a blob is due for deletion.
import { put, setTtl } from '@vercel/blob';
// Delete this export 7 days after uploadconst blob = await put('exports/report.csv', csv, { access: 'private', ttlDays: 7,});
console.log(blob.expiresAt); // 2026-11-24T00:00:00.000Z
// Change your mind later: extend to 30 days, or clear it with nullawait setTtl(blob.url, { ttlDays: 30 });await setTtl(blob.url, { ttlDays: null });setTtl() changes or removes the TTL of blobs you already have, one URL or up to 1,000 at a time, without re-uploading them.
In Vercel CLI 65.16.0 and later, pass --ttl-days to vercel blob put, put-image, copy or presign, and use vercel blob set-ttl on existing blobs.
vercel blob put report.csv --ttl-days 7vercel blob set-ttl exports/a.csv exports/b.csv --ttl-days 30vercel blob set-ttl exports/a.csv --clear-ttlSetting a TTL costs one Advanced Operation per started 60 days, on top of the write. A 7-day TTL costs one, and the 730-day maximum costs 13. Clearing a TTL and the deletions themselves are free. You can track TTL operations in the Blob section of the Observability tab.
npm install @vercel/blob@2.9.0
Learn more in the Vercel Blob documentation.