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.
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 (--access is required: public or private)
vercel blob create-store my-blob-store --access public
# 2. Upload files (--access is required: public or private)
vercel blob put ./assets/logo.png --pathname images/logo.png --access public
vercel blob put ./data/config.json --content-type application/json --access public
# 3. List blobs
vercel blob list --prefix images/ --limit 20
# 4. Copy a blob (--access is required: public or private)
vercel blob copy images/logo.png images/logo-backup.png --access public
# 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. The --access flag is required and accepts public or private:
vercel blob create-store my-blob-store --access publicTo specify a region for the store:
vercel blob create-store my-blob-store --access public --region iad1Upload a file to a specific path in your blob store. The --access flag is required and accepts public or private:
vercel blob put ./assets/logo.png --pathname images/logo.png --access publicThe CLI infers the content type from the file extension. To set it explicitly:
vercel blob put ./data/config.json --content-type application/json --access publicTo control cache behavior:
vercel blob put ./assets/hero.jpg --pathname images/hero.jpg --cache-control-max-age 86400 --access publicIf 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-overwrite --access publicTo add a random suffix to the filename (useful for avoiding collisions with user uploads):
vercel blob put ./uploads/photo.jpg --add-random-suffix --access privateList 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. The --access flag is required and accepts public or private:
vercel blob copy images/logo.png images/logo-backup.png --access publicThis 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?