Our command line client, doctl
would make deleting multiple snapshots from your account quite simple. To list all of your images, use:
- doctl compute image list-user
This allows you to retrieve their image IDs. Using the IDs, you could write a small script to delete in bulk:
#!/bin/bash
for i in 123456 789012; do
doctl compute image delete "$i"
done
If you wanted to delete all the snapshots on your account, you could do something like:
#!/bin/bash
doctl compute image list-user -o json | jq -c '.[] | select(.type == "snapshot") | .id' | while read i; do
doctl compute image delete "$i"
done
Of course, our API also supports deleting images. There are libraries in a number of different languages as well.

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.