Cannot empty bucket in Spaces

Posted February 18, 2019 4.7k views
Object StorageCDN

I’m trying to all the files in my Spaces bucket.

I go to the control panel and the message says: This space cannot be destroyed using the control panel because it contains too many files. View Details

So I go to the folder and try to select all files and delete them. It runs for about a minute then stops working. Nothing is deleted.

I go to install Amazon CLI. And I follow the instructions in Amazon’s docs to delete.

I used the following line:

aws s3 rm s3://my-bucket --recursive --endpoint-url

I get the error: fatal error: maximum recursion depth exceeded while calling a Python object

What am I supposed to do now to empty out my bucket?

Also, “Spaces” is not a tag in this forums.

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Submit an Answer
3 answers

Hey friend,

Sorry for the trouble this has given you. I have a slightly different suggestion here:


I have more than 1 million files in my bucket. s3cmd removes files very low. How I can remove my bucket the fastest way?

It looks like s3cmd deletes about 1 file per second, so my 136K files will take 37 hours.