You have to empty it first, sorry :-) There are two ways:
The convenient one is available in s3cmd 0.9.9 and newer and is as simple as s3cmd del --recursive s3://bucket-to-delete
The less convenient one available prior to s3cmd 0.9.9 involves creating an empty directory, say /tmp/empty and synchronizing its content (i.e. nothing) to the bucket: s3cmd sync --delete /tmp/empty s3://bucket-to-delete
Once the bucket is empty it can then be removed with s3cmd rb s3://bucket-to-delete
User Comments
Mike -
11 July 2014
Note that it's "--recursive".
admin -
13 July 2014
Thanks, fixed.
Ville -
16 April 2018
Now additionally the "--force" switch is required when deleting a bucket that has content with "--recurse".