How to delete an Object Storage bucket
This guide walks you through deleting an Object Storage bucket using the Azion Console, Azion API, and Azion CLI.
Deleting a bucket
In the Azion Console, you can delete a bucket by following these steps:
- Access the Object Storage menu in the Products menu.
- On the Object Storage page, click on the bucket you want to delete.
- On the bucket page, click the Settings button.
- In Danger Zone, you can permanently delete the bucket. Note: You cannot delete a bucket that is not empty. Additionally, objects deleted in the last 24 hours are also taken into account.
Requirements
To delete a bucket:
azion delete edge-storage bucket --name yourbucketnameRun the following DELETE request in your terminal, replacing [TOKEN VALUE] with your personal token and bucket_name with the name of the bucket you want to delete:
curl --location --request DELETE 'https://api.azion.com/v4/storage/buckets/bucket_name' \--header 'Accept: application/json' \--header 'Authorization: Token [TOKEN VALUE]'You’ll receive a response similar to this:
/{"state":"executed","data":{"name":"bucketname","edge_access":"read_only"}}%