<p>In GKE, the <code>Reclaim Policy</code> of my <code>PersistentVolume</code> is set to <code>Retain</code>, in order to prevent unintentional data removal. However, sometimes, after the deletion of some <code>PersistentVolumes</code>, I'd like to remove the associated <code>Google Persistent Disks</code> manually. Deleting the <code>Google Persistent Disks</code> using the web UI (i.e. Google Cloud Console) is time-consuming, that's why I'd like to use a  <code>gcloud</code> command to remove all <code>Google Persistent Disks</code> that are not attached to a GCP VM instance. Could somebody please provide me this command?</p>

Fabrice Jammes
<p>This one should work:</p>
<pre><code>gcloud compute disks delete $(gcloud compute disks list --filter=&quot;-users:*&quot; --format &quot;value(uri())&quot;)
</code></pre>
