Question

Can you destroy multiple droplets at once?

Posted January 25, 2017 3.7k views
Deployment

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?

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.

1 answer

@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

by Marko Mudrinić
DigitalOcean's web based control panel provides a convenient, point-and-click interface for managing Droplets. There are many times, however, when a command-line tool may be a preferable alternative. doctl, the official DigitalOcean command-line client, leverages the DigitalOcean API to provide access to most account and Droplet features.
Submit an Answer