https://github.com/jazware/s3purge
Delete all objects from a S3-compatible bucket very quickly
https://github.com/jazware/s3purge
Last synced: 8 months ago
JSON representation
Delete all objects from a S3-compatible bucket very quickly
- Host: GitHub
- URL: https://github.com/jazware/s3purge
- Owner: jazware
- License: mit
- Created: 2023-10-31T06:37:55.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2023-11-06T22:26:04.000Z (over 2 years ago)
- Last Synced: 2025-09-09T07:37:03.683Z (9 months ago)
- Language: Go
- Size: 12.7 KB
- Stars: 3
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# S3 Purge
`s3purge` is a simple Go program to purge the contents of an S3 bucket in parallel.
Existing methods of purging S3 buckets (i.e. `rclone purge`) are rather slow and don't have the performance required to expeditiously delete large numbers (hundreds of thousands to millions) of objects in a reasonable timeframe.
`s3purge` has been tested on Cloudflare's R2 object storage to delete ~3,000 objects per second using the default concurrency of `250`.
## Building and Running
Build with the included makefile using:
```shell
make build
```
Run the binary produced with flags for your S3 backend:
```shell
$ ./s3purge --endpoint {your_s3_backend_https_url} --accessKey {your_key} --secretKey {your_secret} --bucket {your_bucket_name}
```
By default, `s3purge` outputs a progress marker every 5 seconds with the average rate of deletion.
When no objects remain, `s3purge` will exit and tell you how many objects it deleted.