Helm is not showing releases / Can't delete old releases

8/27/2019

I am using helm v3.0.0-alpha.2 on Kubernetes v1.15.3.

[root@somebox log]# helm version
version.BuildInfo{Version:"v3.0.0-alpha.2", GitCommit:"97e7461e41455e58d89b4d7d192fed5352001d44", GitTreeState:"clean", GoVersion:"go1.12.7"}

helm list shows no releases.

[root@somebox log]# helm list
NAME    NAMESPACE       REVISION        UPDATED STATUS  CHART

Yet I cannot install a new release and give it a name because it is 'still in use'. It was a release at some point, but should no longer exist.

[root@somebox log]# helm install --namespace rook-ceph rook-ceph-acme rook-release/rook-ceph
Error: cannot re-use a name that is still in use

How can I clear out old releases that are not showing up with helm list?

Thanks.

-- David West
kubernetes-helm

1 Answer

2/10/2020

First, you have to list the releases with the namespace assigned to it. Second, you have to purge all the releases in helm2; it will automatically purge in helm3

helm2

helm del <release-name> --namespace <namespace>
helm del $(helm ls --all | grep 'DELETED' | awk '{print $1}') --purge

helm3

helm3 del <release-name> --namespace <namespace>

# list and delete the release
helm3 del -n rook-ceph $(helm3 ls -n rook-ceph | grep 'rook-ceph' | awk '{print $1}')

More details: https://devopsqa.wordpress.com/2020/01/29/helm-cli-cheatsheet/

-- Prashanth Sams
Source: StackOverflow