I'm trying find a way to delete all deployed releases in Helm.
It appears that Helm does not support deleting all releases, with --all
or otherwise.
Would there be another way to delete all Helm releases in one command?
I'm trying find a way to delete all deployed releases in Helm.
It appears that Helm does not support deleting all releases, with --all
or otherwise.
Would there be another way to delete all Helm releases in one command?
helm delete $(helm ls --short)
Description:
helm ls --short
gives a list of releases ids.helm delete id1 id2 id3
deletes realeses with ids: id1, id2, id3.So combining them we get:
helm delete $(helm ls --short)
To delete all Helm releases with a single command, you can use some good old bash. Just pipe the output of
helm ls --short
toxargs
, and runhelm delete
for each release.helm ls --all --short | xargs -L1 helm delete
Adding
--purge
will delete the charts as well, as per @Yeasin Ar Rahman's comment.helm ls --all --short | xargs -L1 helm delete --purge
I regularly delete all releases in Helm too, so I thought it'd be useful to make a Helm plugin for it.
Install:
(You may be able to omit the
--version x
part on newer versions of Helm.)Usage:
https://github.com/astronomerio/helm-delete-all-plugin
This worked for me in a powershell cmd window: