<p>I deployed my apps using helm. Mistakenly I put the same helm release name. Now how can I delete the specific deployment for e.g. first one with chart <code>my-chart-1.0.0</code>. </p>

<pre><code>$ helm ls

NAME                REVISION    UPDATED                     STATUS      CHART               NAMESPACE
appname         1           Mon Oct  1 10:36:17 2018    DEPLOYED    my-chart-1.0.0      default
appname         1           Mon Sep 10 17:18:49 2018    DEPLOYED    my-chart-2.0.0      default
appname         1           Mon Sep 10 18:18:49 2018    DEPLOYED    my-chart-3.0.0      default
</code></pre>

<p>Any help is appreciated.</p>

<p>Thanks</p>

surazzarus
<p>I think this should help:</p>

<p><code>helm delete $(helm ls | awk '$9 ~ /SEARCH/ { print $1 }')</code></p>

<p>Replace <code>SEARCH</code> with any chart pattern, in your case <code>my-chart-1.0.0</code>.
I would also add a <code>--dry-run</code> and check if this is indeed the deployment you want to remove.</p>

<p>You can read the Helm documentation regarding <a href="https://docs.helm.sh/helm/#helm-delete" rel="nofollow noreferrer">helm delete</a>.</p>
