R2 - Empty buckets and delete folders from the R2 dashboard
Key Points
- Empty entire R2 bucket from dashboard
- Delete folder-prefixes (common-prefix) from Objects tab
- Background progress and guided delete flow
Summary
Cloudflare R2 now supports emptying an entire bucket and deleting folder-like prefixes directly from the dashboard. These actions remove objects (not the bucket configuration) and are performed from the bucket Settings and Objects tabs, with background progress for large operations.
Key Points
- Empty a bucket from the bucket's Settings tab: choose "Empty" under the Empty Bucket section. This deletes all objects but preserves the bucket and its configuration.
- Emptying a bucket is required before you can delete the bucket; the dashboard guides you through both steps in one place.
- For large buckets the empty operation runs in the background and shows progress in the dashboard.
- R2 presents flat objects as folders when "View prefixes as directories" is enabled; deleting a folder deletes every object with that prefix.
- From the Objects tab you can select one or more folders (or individual objects) and delete them in bulk.
- Previously this required custom scripting or lifecycle rules; the dashboard consolidates these workflows into one UI.
How to (practical steps)
- Empty a bucket: Bucket -> Settings -> Empty -> confirm. Monitor progress in the dashboard.
- Delete prefixes/folders: Bucket -> Objects -> enable "View prefixes as directories" (if not already) -> select folder(s) -> Delete.
Notes and precautions
- Deletions remove objects under the selected prefix or bucket; confirm before proceeding. The bucket configuration remains after emptying.
References
- Refer to the dashboard's Delete buckets and Delete objects help pages for step-by-step guidance.