Skip to content

Instantly share code, notes, and snippets.

@regmicmahesh
Created July 22, 2024 03:52
Show Gist options
  • Save regmicmahesh/3f9884eaebbef9bd51a0a8c171a85ba2 to your computer and use it in GitHub Desktop.
Save regmicmahesh/3f9884eaebbef9bd51a0a8c171a85ba2 to your computer and use it in GitHub Desktop.
Delete unused digital ocean volumes
doctl compute volume list --format "ID,Size,Name,Region,Droplet IDs" --no-header | awk '{if ($6 == "") print $1}' | xargs -n1 doctl compute volume delete -f
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment