Blog

Deleting containers and objects - OpenStack

  • (4.0)
  •   |   585 Ratings

The Swift Client Tool allows us to directly delete containers and objects within our OpenStack Object Storage environment.

Getting started

Log in to a computer or server that has the swift client package installed..

To gain in-depth knowledge and be on par with practical experience, then explore  OpenStack Training course.

How to achieve it…

We will delete objects in our OpenStack Object Storage environment using the different swift client options:

Deleting objects

To delete the object tmp/test/test1, we issue the following:


This deletes the object tmp/test/test1 from the container test.

Deleting multiple objects

To delete the objects tmp/test/test2 and tmp/example-500Mb, we issue the following command:



This deletes the objects tmp/test/test2 and tmp/example-500Mb from the container test.

Deleting containers

To delete our test container, we issue the following command:


This will delete the container and any objects under this container.

Deleting everything from our account

To delete all containers and objects in our account, we issue the following command:


This will delete all containers and any objects under these containers.

Explore OpenStack Sample Resumes! Download & Edit, Get Noticed by Top Employers!  Download Now!

How it works…

The swift client is a basic but versatile tool that allows us to do many of the things we want to do with files. Deleting objects and containers is achieved using the following syntax:

To download all objects from our account (for example, from all containers), we specify the following syntax:

 
https://docs.openstack.org/user-guide/managing-openstack-object-storage-with-swift-cli.html

 

Related Pages:
Openstack Tutorial

Interview Questions:
Openstack Interview Questions

 


Popular Courses in 2018

Get Updates on Tech posts, Interview & Certification questions and training schedules