Managing Vercel Blob storage from the CLI
Use this guide to manage Vercel Blob storage from the CLI. You'll create a store, upload and organize files, and handle cleanup.
This guide requires a linked Vercel project. Run
vercel link in your project directory if you haven't already.
Use this block when you already know what you're doing and want the full command sequence. Use the steps below for context and checks.
# 1. Create a blob store
vercel blob create-store my-blob-store
# 2. Upload files
vercel blob put ./assets/logo.png --pathname images/logo.png
vercel blob put ./data/config.json --content-type application/json
# 3. List blobs
vercel blob list --prefix images/ --limit 20
# 4. Copy a blob
vercel blob copy images/logo.png images/logo-backup.png
# 5. Delete a blob
vercel blob del images/old-logo.png
# 6. Inspect a store
vercel blob get-store <store-id>Create a new blob store for your project:
vercel blob create-store my-blob-storeTo specify a region for the store:
vercel blob create-store my-blob-store --region iad1Upload a file to a specific path in your blob store:
vercel blob put ./assets/logo.png --pathname images/logo.pngThe CLI infers the content type from the file extension. To set it explicitly:
vercel blob put ./data/config.json --content-type application/jsonTo control cache behavior:
vercel blob put ./assets/hero.jpg --pathname images/hero.jpg --cache-control-max-age 86400If a file already exists at the target pathname, use --allow-overwrite to replace it:
vercel blob put ./assets/logo-v2.png --pathname images/logo.png --allow-overwriteTo add a random suffix to the filename (useful for avoiding collisions with user uploads):
vercel blob put ./uploads/photo.jpg --add-random-suffixList all blobs in your store:
vercel blob listFilter by prefix to browse a specific directory:
vercel blob list --prefix images/ --limit 20For paginated results, use the cursor from the previous response:
vercel blob list --prefix images/ --limit 10 --cursor <cursor-value>Copy a blob to a new location within the same store:
vercel blob copy images/logo.png images/logo-backup.pngThis creates a new blob at the destination path without modifying the original.
Remove a blob you no longer need:
vercel blob del images/old-logo.pngTo inspect a store's details:
vercel blob get-store <store-id>To remove a store entirely:
vercel blob delete-store <store-id>Was this helpful?