Report this

What is the reason for this report?

Can you destroy multiple droplets at once?

Posted on January 25, 2017

Hi,

I was wondering if it’s possible to destroy multiple droplets at once or does it have to be done manually? having to close down 20-50 droplets manually is time consuming, so hopefully there’s a better, more efficient way of handling this?



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!

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.

@AidanNewin

It’s not currently possible from the DigitalOcean Control Panel, though you could use the API or even doctl, and write a script that would perform either the shutdown or destroy actions. You would need to write a script to handle interaction with the API or with doctl to automate this, but it can be done.

API

https://developers.digitalocean.com/documentation/v2/

doctl

https://www.digitalocean.com/community/tutorials/how-to-use-doctl-the-official-digitalocean-command-line-client

Here is an script that can be useful:

DigitalOcean-destroy-all-Droplets

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.