All Products
Search
Document Center

Object Storage Service:Delete a bucket

Last Updated:Mar 20, 2026

Deletes a bucket using the ossutil CLI.

Prerequisites

Before you begin, make sure that:

  • The bucket is empty. Object Storage Service (OSS) does not allow deleting a non-empty bucket.

  • You are the bucket owner. Only the bucket owner has permission to delete a bucket.

  • You have the required permission. By default, Alibaba Cloud accounts have full permissions. RAM users and RAM roles have no permissions by default. Grant the oss:DeleteBucket action via RAM Policy or Bucket Policy.

Permissions

APIActionDescription
DeleteBucketoss:DeleteBucketDeletes a bucket.

Syntax

ossutil api delete-bucket --bucket <bucket-name> [flags]
ParameterTypeRequiredDescription
--bucketstringYesThe name of the bucket.
Note: For all available flags, see Command-line options.

Examples

Delete a bucket named examplebucket:

ossutil api delete-bucket --bucket examplebucket