Deleting a Bucket
Function
You can use this command to delete a bucket. The bucket to be deleted must be empty (containing no objects, historical versions, or fragments).
To delete a non-empty bucket, run the commands in Deleting a Multipart Upload Task and Deleting an Object to clear the bucket, and then run the following command to delete the bucket.
Command Line Structure
- In Windows
obsutil rm obs://bucket [-f] [-config=xxx] [-e=xxx] [-i=xxx] [-k=xxx] [-t=xxx]
- In Linux or macOS
./obsutil rm obs://bucket [-f] [-config=xxx] [-e=xxx] [-i=xxx] [-k=xxx] [-t=xxx]
Examples
- Take the Windows OS as an example. Run the obsutil rm obs://bucket-test command to delete bucket bucket-test.
obsutil rm obs://bucket-test Do you want to delete bucket [bucket-test] ? Please input (y/n) to confirm: y Delete bucket [bucket-test] successfully!
Parameter Description
Parameter |
Optional or Mandatory |
Description |
---|---|---|
bucket |
Mandatory |
Bucket name |
f |
Optional (additional parameter) |
Runs in force mode. |
config |
Optional (additional parameter) |
User-defined configuration file for executing a command. For details about parameters that can be configured, see Configuration Parameters. |
e |
Optional (additional parameter) |
Specifies the endpoint. |
i |
Optional (additional parameter) |
Specifies the user's AK. |
k |
Optional (additional parameter) |
Specifies the user's SK. |
t |
Optional (additional parameter) |
Specifies the user's security token. |
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot