<p>I'm frequently installing multiple instances of an umbrella Helm chart across multiple namespaces for testing.  I'd like to continue using the randomly generated names, but also be able to tear down multiple releases of the same chart in one command that doesn't need to change for each new release name.</p>

<p>So for charts like this:</p>

<pre><code>$ helm ls
NAME                REVISION    UPDATED                     STATUS      CHART                 NAMESPACE
braided-chimp       1           Mon Jul 23 15:52:43 2018    DEPLOYED    foo-platform-0.2.1    foo-2
juiced-meerkat      1           Mon Jul  9 15:19:43 2018    DEPLOYED    postgresql-0.9.4      default
sweet-sabertooth    1           Mon Jul 23 15:52:34 2018    DEPLOYED    foo-platform-0.2.1    foo-1
</code></pre>

<p>I can delete all releases of the <code>foo-platform-0.2.1</code> chart by typing the release names like:</p>

<pre><code>$ helm delete braided-chimp sweet-sabertooth
</code></pre>

<p>But every time I run the command, I have to update it with the new release names.</p>

<p>Is it possible to run list / delete on all instances of a given chart across all namespaces based on the chart name?  (I'm thinking something like what <code>kubectl</code> supports with the <code>-l</code> flag.)</p>

<p>For instance, how can I achieve something equivalent to this?</p>

<pre><code>$ helm delete -l 'chart=foo-platform-0.2.1'
</code></pre>

<p>Is there a better way to do this?</p>

<p>You could try:</p>

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

<p>Replacing <code>SEARCH</code> with whatever chart name pattern you want to use</p>

<p>It gets thrown off a little because awk is going to delimit on the spaces, which the timestamp has several of.</p>

<p>So what would traditionally be tab delimited:</p>

<p><code>1=NAME</code> <code>2=REVISION</code> <code>3=UPDATED</code> <code>4=STATUS</code> <code>5=CHART</code> <code>6=NAMESPACE</code></p>

<p>becomes:</p>

<p><code>1=mottled-whippet</code> <code>2=1</code> <code>3=Fri</code> <code>4=Jul</code> <code>5=20</code> <code>6=13:15:45</code> <code>7=2018</code>   <code>8=DEPLOYED</code> <code>9=postgresql-0.15.0</code> <code>10=namespace</code></p>
