Updated on 2026-08-21 GMT+08:00

Deleting a Bucket

You can use OBS Console, APIs, SDKs, OBS Browser+, or obsutil to delete unwanted or empty buckets to free up the bucket quantity quota and reduce storage costs.

Important Notes

  • To reuse the name of a deleted bucket, you must wait until the bucket name is fully released. Deleting a bucket via API typically takes about 30 minutes, but the process can take longer in special situations. For example, if a bucket is deleted due to account arrears or account cancellation, the bucket must be emptied before deletion, which extends the processing time. Because of this, OBS cannot guarantee how long the deletion and release process will take. If you try to create a new bucket using a name that has not yet been released, the creation will fail. Likewise, even after the name is released, if another user claims it before you do, creating a bucket with the same name will also fail.
  • Bucket deletion cannot be undone. If you may need the data later, back up the data in the bucket and consider changing the storage class to lower storage costs.
  • Deleting a bucket also interrupts any services that rely on it, such as static website hosting and CDN, so proceed with caution.
  • If cross-region replication is enabled, deleting a bucket may also remove data in the destination bucket. Review your configuration before you delete the source bucket.
  • A bucket must be emptied before it can be deleted, including all objects and fragments. Deleting a large number of items generates API request costs, and the time required depends on how many objects and fragments need to be deleted.

Constraints

Only the bucket owner and users granted the obs:bucket:DeleteBucket permission can delete a bucket. To grant this permission through IAM or bucket policies, see Creating a Custom Policy or Creating a Custom Bucket Policy.

If you have the obs:bucket:DeleteBucket permission in an IAM policy but still cannot delete a bucket, a Deny statement for obs:bucket:DeleteBucket may be present in an SCP or bucket policy. Allow the obs:bucket:DeleteBucket permission and then delete the bucket.

Ways to Delete a Bucket

You can use OBS Console, APIs, SDKs, OBS Browser+, or obsutil to delete a bucket.

Step 1: Delete Objects and Fragments in the Bucket

A bucket can be deleted only after all objects and fragments in it are permanently deleted.

Step 2: Delete the Bucket

You can use OBS Console, APIs, SDKs, OBS Browser+, or obsutil to delete a bucket.