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…