COORD: 44.21.90
OFFSET: +12.5°
SYS.READY
BUFFER: 99%
FOCAL_PT
BACK TO DEVLOG
WORKSPACE

Vercel Blob Storage Cleanup

Free Vercel blob storage quota was being consumed, but unclear which project was responsible. The blob store was named \"slay-the-spire\" and the user had the read-write token handy.

2025-01-23 // RAW LEARNING CAPTURE
PROJECTWORKSPACE

Starting Point

Free Vercel blob storage quota was being consumed, but unclear which project was responsible. The blob store was named "slay-the-spire" and the user had the read-write token handy.

Listing Blobs

The --rw-token flag didn't work as expected:

vercel blob list --rw-token vercel_blob_rw_qS3fAZ1vOkRldVEZ_Ul4bepvh8rGZN5vtVKs5vldOHEfqYi --limit 20
Error: No Vercel Blob token found.

The env var approach works instead:

BLOB_READ_WRITE_TOKEN=vercel_blob_rw_qS3fAZ1vOkRldVEZ_Ul4bepvh8rGZN5vtVKs5vldOHEfqYi vercel blob list --limit 20

This listed PNGs — all game screenshots, ~1.5-2.4 MB each, uploaded ~270 days prior.

Counting the Damage

BLOB_READ_WRITE_TOKEN=... vercel blob list --limit 1000 2>&1 | grep -c "\.png"

760 PNGs — roughly 1.5 GB of screenshots eating the free tier.

Batch Deletion

Extracted all URLs to a file:

vercel blob list --limit 1000 2>&1 | grep "https://" | awk '{print $NF}' > /tmp/blob_urls.txt

Then deleted in batches using xargs:

head -100 /tmp/blob_urls.txt | xargs vercel blob del
sed -n '101,200p' /tmp/blob_urls.txt | xargs vercel blob del
# ... repeat through 701-760

Each batch returns:

Vercel CLI 50.4.9
Deleting blob
> Success! Blob deleted

vercel blob del accepts multiple URLs as positional args and deletes them all in one call. Batches of 100 worked fine within default timeout.

Where We Landed

All 760 blobs deleted. User also removed the blob store entirely from the Vercel dashboard afterward.

Takeaways

  • vercel blob list --rw-token TOKEN doesn't work despite being documented in --help. Use BLOB_READ_WRITE_TOKEN=TOKEN env var instead.
  • vercel blob del accepts multiple URLs as args — no need for a loop, just xargs.
  • vercel blob list --limit 1000 is the max page size. For stores with >1000 items, you'd need to paginate with --cursor.
  • The CLI only shows "Success! Blob deleted" (singular) even when deleting hundreds — no count or progress indicator.
LOG.ENTRY_END
ref:workspace
RAW