When you no longer need to keep a certain Bucket, you can delete it. You can delete a COS Bucket on the Bucket list page through the COS console. You can also delete a Bucket using the console, tools, APIs, or SDKs.
Note:
A bucket cannot be recovered once deleted.
Prerequisites
Before executing bucket deletion, please confirm the following conditions must be met.
Completed the deletion of all files and their earlier versions in the bucket. For how to delete files and their earlier versions, see Clear the bucket. Confirmed to have operation permissions for deleting bucket.
The root account has by default the permission to delete bucket. If your account is a sub-account, choose the following solution to obtain the permission to delete bucket:
Option 1: Add a favorite path: Use the root account to grant the sub-account specific bucket user permissions. After logging in with a sub-account to the COS console, add the bucket's favorite path to achieve bucket deletion operation permissions. Option 2: Add preset policy: Add preset policy QcloudCOSFullAccess or QcloudCOSDeleteBucketAccess (permission to delete designated bucket) for sub-account to access bucket and implement bucket deletion operation. Notes
Be sure to carefully read the following information, as ignoring it may cause disruption to your business.
When deleting Bucket, you need to ensure the identity is authorized for the operation and confirm the correct Bucket name and Region parameter are passed in.
After deleting Bucket, data cannot be recovered. Please confirm the data is no longer in use before deleting. If you need to continue using data in Bucket, please refer to Cloud Data Backup to plan in advance. After deleting Bucket, you have to wait several hours (typically 4 to 8 hours) to create one with the same name. During this period, this name is open to everyone and can be used to create Bucket. If you hope to continue using the original Bucket name, it is advisable to empty content rather than delete directly so that Bucket is retained.
How to Use
Using COS console
1. Log in to the COS console. Click Bucket List on the left sidebar to open the bucket list page. 2. Find the target bucket and click More > Delete in the Operation column on the right.
3. In the pop-up window, perform the operation based on the system check result.
Using tools
Use tools such as COSBrowser and COSCMD to delete a bucket. For more information, see Tool Overview. Using the REST API
Use the RESTful API to initiate a bucket deleting request. For more information, see DELETE Bucket in API documentation. Using SDKs
Directly call the bucket deleting method in the SDK. For more information, see the SDK documentation for the corresponding programming language below:
FAQs