Delete bucket
Updated at:2025-11-03
The following code can be used to delete a bucket:
Python
1bos_client.delete_bucket(bucket_name)
Note:
- If the bucket is not empty (i.e., it contains objects or unfinished three-step upload parts), it cannot be deleted. You must empty the bucket first to delete it successfully.
- Before deleting a bucket, verify that Cross-Region Replication (CRR) is not enabled for the bucket, and that it is neither the source nor target bucket in any CRR rules. Otherwise, the deletion will fail.
