yc compute disk list --format json
yc compute disk list --format json | jq '.[] | select(.status=="DETACHED") | {id: .id, name: .name, zone: .zone}'
yc compute disk list --format json | jq '.[] | select(.status=="DETACHED")' > unused_disks.json
yc compute disk delete <disk-id>
for disk in $(jq -r '.[].id' unused_disks.json); do yc compute disk delete "$disk"; done