Deletions
Delete files using the Shelby CLI
Overview
The Shelby CLI provides operations for deleting blobs from the Shelby network. Deletion is a soft delete that marks blobs as deleted on the blockchain.
It is important that the CLI is properly configured with a network and funded account. If not, please visit the Getting Started quick start guide for more information.
shelby delete
Delete a blob or folder of blobs from Shelby. You can only delete blobs that you own.
shelby delete [options] <destination>Options
| Flag | Alias | Type | Required | Default | Description |
|---|---|---|---|---|---|
--recursive | -r | flag | false | Delete all blobs matching the prefix. | |
--assume-yes | flag | false | Skip interactive confirmation. Useful for scripts. |
If deleting a single blob, <destination> must be a valid blob name (does not end in /).
When deleting recursively, <destination> must end in /.
Deletion is permanent. Once a blob is deleted, it cannot be recovered. The CLI will prompt for confirmation before deleting unless --assume-yes is provided.
Basic Example
Delete a single blob:
shelby delete files/my-blob.txtRecursive Deletion
Delete all blobs with a given prefix:
shelby delete folder/ -r
shelby delete my-site/ --recursiveWhen using --recursive, the destination must end with / to indicate it's a prefix, not a blob name.
Skip Confirmation
For scripting or automation, use --assume-yes to skip the interactive confirmation prompt:
shelby delete old-files/ -r --assume-yesWhat Happens During Deletion
- The CLI queries the indexer to find matching blobs
- For each blob, it verifies:
- The blob exists and hasn't expired
- You own the blob
- A delete transaction is submitted to the blockchain
- The blob is marked as deleted (soft delete)
Error Cases
- Blob not found: If the blob doesn't exist or has already been deleted/expired, the CLI will report an error
- Not the owner: You can only delete blobs that belong to your active account
- Invalid destination: Single blob deletions cannot end with
/, and recursive deletions must end with/
Example Output
🗑️ Delete Summary
────────────────────────────────────────────
📁 Blob Name: files/my-blob.txt
🧮 Delete list created (1 entry)
⏱️ Took: 0.12345s
Continue?
❯ Yes
No
✔ Delete complete — 1 blob deleted in 2.34s
🌐 Aptos Explorer:
https://explorer.aptoslabs.com/txn/0x...
🗂️ Shelby Explorer:
https://shelbynet.explorer.shelby.xyz/account/0x...
────────────────────────────────────────────
✨ Done!