If you no longer use a bucket, delete it to avoid incurring further fees.

Prerequisites

To delete a bucket, ensure that all objects in the bucket are deleted, including parts generated from incomplete multipart upload tasks. Otherwise, the bucket cannot be deleted.
Warning Deleted objects cannot be recovered. We recommended that you proceed with caution when you perform this operation.

Use the OSS console

To create a bucket in the OSS console, perform the following steps:

  1. Log on to the OSS console.
  2. Click the target bucket. Find the Bucket Management section.
    • New console
      1. Click Buckets, and then click the name of the target bucket.
      2. Choose Basic Settings > Delete Bucket.
    • Old console
      1. In the left-side navigation pane, click the name of the target bucket.
      2. Click the Basic Settings tab. Find the Bucket Management section.
  3. Click Delete Bucket.
  4. In the message that appears, click OK.

Use ossbrowser

ossbrowser is a graphical object management tool for OSS. You can use ossbrowser to delete buckets. For more information, see Quick start.

Use ossutil

ossutil is a command line tool for OSS. You can use ossutil to delete buckets. For more information, see rm.

Use APIs and SDKs

OSS provides APIs and SDKs that use a variety of programming languages to facilitate secondary development. For more information, see the following topics:
  • API operation: DeleteBucket
  • Java SDK: the "Delete a bucket" section in Buckets
  • Python SDK: the "Delete a bucket" section in Bucket
  • PHP SDK: the "Delete a bucket" section in Bucket
  • Go SDK: the "Delete a bucket" section in Bucket
  • C SDK: the "Delete a bucket" section in Bucket
For more information about SDK examples in other programming languages, see Introduction.