OpenAICloudflare Developer PlatformApr 30, 2026, 12:00 AM

R2 - Empty buckets and delete folders from the R2 dashboard

A condensed section focused on the key takeaways first.

Original Post

Quick Digest

Summary

A condensed section focused on the key takeaways first.

openaienmodel: gpt-5-mini-2025-08-07

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.

Full Translation

Translations

A translation section that keeps the flow of the original article.

openaijamodel: gpt-5-mini-2025-08-07

R2 — ダッシュボードからバケットを空にするおよびフォルダを削除する

R2 — ダッシュボードからバケットを空にするおよびフォルダを削除する

公開日: 2026-04-30

R2ダッシュボードからバケット内の全オブジェクトを一括で削除(バケットを空にする)したり、フォルダを直接削除したりできるようになりました。バケットを削除する前に空にする必要がありますが、以前はこれをスクリプトやライフサイクルルールの設定で行う必要がありました。現在はダッシュボード上でワンアクションで実行できます。

バケットを空にする(Empty a bucket)

  • バケットの「Settings」タブに移動し、Empty Bucketセクション内のEmptyを選択します。
  • これによりバケット内のすべてのオブジェクトが削除され、バケット本体とその設定は保持されます。
  • 大容量のバケットでは操作はバックグラウンドで実行され、ダッシュボード上で進行状況が表示されます。
  • バケットを削除する前に空にすることが必須です。ダッシュボードはバケットの空にする操作と削除操作の両方を同じ場所で案内します。

フォルダを削除する(Delete folders)

  • R2はフラットなオブジェクト構造を使用します。ダッシュボードでView prefixes as directoriesチェックボックスを選択すると、共通プレフィックスを持つオブジェクトがフォルダとしてグループ表示されます。
  • フォルダを削除すると、そのプレフィックス配下のすべてのオブジェクトが削除されます。
  • Objectsタブから、1つまたは複数のフォルダを選択して、個別オブジェクトと同様に削除できます。

詳細な手順については、Delete buckets と Delete objects を参照してください。


この機能により、バケット管理の操作がダッシュボード上で簡潔に行えるようになりました。