Delete a bucket

The Remove Bucket (rb) operation deletes a bucket.

Note: The example assumes a bucket that is named sample exists.

Example: Delete a bucket

aws --endpoint-url=https://somename.example.com/ s3 rb s3://sample

Example: Delete a bucket and all objects

aws --endpoint-url=https://somename.example.com/ s3 rb s3://sample --force 1

1 The Remove Bucket (rb) operation with the --force parameter removes a bucket and all of its objects.