Cannot empty bucket in Spaces

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.

Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

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.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

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

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

Hey friend,

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