Easily delete all objects from Cloudflare R2 Bucket

George DanekeGeorge Daneke
1 min read

Does anyone know an easy way to delete all objects from R2 or any other S3 object storage? I have a few suggestions for now: Cyberduck or Rclone.

1) Cyberduck a free program where you can connect to your bucket as it is Amazon S3 storage:

Put your server URL, Access Key ID and put bucket name to Path and then you can delete folders, files, or everything at once - but it will take time.

2) Rclone

You can read about how to configure it on the Cloudflare web-site: https://developers.cloudflare.com/r2/examples/rclone/ and then you can do something like this: rclone purge s3:{{bucket_name}}

0
Subscribe to my newsletter

Read articles from George Daneke directly inside your inbox. Subscribe to the newsletter, and don't miss out.

Written by

George Daneke
George Daneke