Deleting an Object Storage Bucket

Delete an Object Storage bucket.

The Console collects and provides a count of each resource that would prevent bucket deletion. Upon confirmation, the resources are deleted and the bucket is deleted in a single action. If you're deleting a bucket that contains one or more of these resources, consider using the Console to accomplish this task rather than one of the other methods.

Caution

You can't recover a deleted bucket. You can cancel a deletion in progress. However, resources deleted before the cancellation can’t be recovered. You can't delete a bucket that contains any of the following resources:

  • Objects and object versions

  • Pre-authenticated requests

  • Replication policy

  • Uncommitted multi-part uploads
    1. On the Buckets list page, find the Object Storage bucket that you want to work with. If you need help finding the list page or the Object Storage bucket, see Listing Buckets.
    2. From the Actions menu for the bucket, select Delete.
    3. When prompted, confirm the deletion.
  • Use the oci os bucket delete command and required parameters to delete a bucket:

    oci os bucket delete --name bucket_name [OPTIONS]

    For example:

    oci os bucket delete --name MyDeletedBucket
    Are you sure you want to delete this resource? [y/N]:

    Select y and press Enter. The bucket is deleted with no further prompting.

    For a complete list of parameters and values for CLI commands, see the CLI Command Reference.

  • Run the DeleteBucket operation to delete bucket.

    When accessing the Object Storage API, the bucket name is used with the Object Storage namespace name to form the request URL:

    n/object_storage_namespace/b/bucket