Deleting Containers

All objects within a container must first be deleted before the container can be deleted. To find out whether a container contains any objects, send a HEAD request to the container URL.

Any user with the Service Administrator role can perform this task.

For information about deleting containers by using the Java library, see deleteContainer in Java API Reference for Oracle Cloud Storage Service.

For information about deleting containers by using the REST API, see Delete Container in OpenStack Object Storage Service API Reference.

For information about deleting multiple objects in a container in a single operation, see Bulk-Deleting Objects.

cURL Command Syntax

curl -v -X DELETE \
     -H "X-Auth-Token: token" \

HTTP Response Codes

cURL Command Example

curl -v -X DELETE \
     -H "X-Auth-Token: AUTH_tkb4fdf39c92e9f62cca9b7c196f8b6e6b" \


The URL of the account in this example is Replace this URL with the URL for your account. For the steps to find out your account URL, see URL for the Account.
The following is an example of the output of this command:
* About to connect() to port 443 (#0)
*   Trying connected
* Connected to ( port 443 (#0)
* Initializing NSS with certpath: sql:/etc/pki/nssdb
*   CAfile: /etc/pki/tls/certs/ca-bundle.crt
  CApath: none
* SSL connection using TLS_RSA_WITH_AES_128_CBC_SHA
* Server certificate:
*       subject: CN=*,O=Oracle Corporation,L=Redwood Shores,ST=California,C=US
*       start date: Oct 22 00:00:00 2014 GMT
*       expire date: Dec 21 23:59:59 2015 GMT
*       common name: *
*       issuer: CN=Symantec Class 3 Secure Server CA - G4,OU=Symantec Trust Network,O=Symantec Corporation,C=US
> DELETE /v1/Storage-myIdentityDomain/FirstContainer HTTP/1.1
> User-Agent: curl/7.19.7 (x86_64-redhat-linux-gnu) libcurl/7.19.7 NSS/ zlib/1.2.3 libidn/1.18 libssh2/1.4.2
> Host:
> Accept: */*
> X-Auth-Token: AUTH_tkb4fdf39c92e9f62cca9b7c196f8b6e6b
< HTTP/1.1 204 No Content
< Date: Fri, 06 Mar 2015 10:43:38 GMT
< Content-Length: 0
< Content-Type: text/html; charset=UTF-8
< X-Trans-Id: txc100a7408d564f82916fb-0054f984da
< Cache-Control: no-cache
< Pragma: no-cache
< Content-Language: en
* Connection #0 to host left intact
* Closing connection #0