Published on

Deleting All Dangling Releases in Helm

Authors

When deleting releases with Helm if you helm delete some-release-name but do not use the --purge flag then the release name is not freed up. If you type helm ls you will not see it but as soon as you add the -a flag you see the left over release names that were not purged. I had quite a few of these and did not want to delete these by hand. I hoped I could delete all dangling releases using helm itself but no such luck. I put together this little script which does this for me:

for release in `helm ls -a | grep -i DELETED | cut -f1`; do echo ---------------$release; helm delete $release --purge;done