Skip to content

Instantly share code, notes, and snippets.

@johnybradshaw
Created November 15, 2023 15:01
Show Gist options
  • Save johnybradshaw/294e4f15cb1d75ea35a809ffb3c6d295 to your computer and use it in GitHub Desktop.
Save johnybradshaw/294e4f15cb1d75ea35a809ffb3c6d295 to your computer and use it in GitHub Desktop.
Delete/Prune all unattached volumes on Linode (Akamai)
#!/bin/bash
# Prune all unattached volumes
linode-cli volumes list --json | jq -r '.[] | select(.linode_id == null) | .id' | xargs -I {} linode-cli volumes delete {}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment