Remove all empty containers in one go [Swift]

asked 2016-03-09 05:52:38 -0600

Aun gravatar image

updated 2016-03-09 05:53:43 -0600

I looked around but couldn't find any solution. I run some tests on swift setup and it created more than 100 empty containers. Now I'm looking for a way to remove all the current containers in my swift setup in one go. Any command or any option from Horizon which let me do this? sure i can delete each container individually but that will take enough time. Any help will be appreciated. Thanks!

edit retag flag offensive close merge delete

2 answers

Sort by ยป oldest newest most voted

answered 2016-03-09 08:00:03 -0600

Aun gravatar image

updated 2016-03-09 08:01:48 -0600

I found an ugly way to do it, I installed Cyberduck, logged in my account in this application, selected and deleted all containers, but I'm still interested to know if there is any such swift command?

edit flag offensive delete link more

answered 2016-03-09 09:13:49 -0600

Bipin gravatar image


The following will work

for i in $(swift list); do swift delete $i; done
edit flag offensive delete link more

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower


Asked: 2016-03-09 05:52:38 -0600

Seen: 246 times

Last updated: Mar 09 '16