Technology1 min read

Vercel Blob now supports TTLs for automatic deletion

By · Published by Everything Blog

In short

The platform has introduced time-to-live settings directly within its object storage service. This feature enables automatic deletion of assets once their designated lifespan expires. By managing file lifecycles natively, users can prevent unwanted data accumulation without writing custom deletion scripts.

Key points

  • Setting time-to-live values allows systems to automatically remove unwanted stored object…: Setting time-to-live values allows systems to automatically remove unwanted stored objects.
  • Cloud storage maintenance is simplified through built-in asset lifecycle automation capab…: Cloud storage maintenance is simplified through built-in asset lifecycle automation capabilities.
  • Developers can optimize storage usage without relying on separate deletion scripts.: Developers can optimize storage usage without relying on separate deletion scripts.

Sources checked by our analysis pipeline: 1

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…

Technology