<p>After I uninstalled a release(with --keep-history), there will remain a release history with &quot;uninstalled status&quot;.</p>
<p>Then if I want to install this release again, <code>install</code> and <code>upgrade --install</code> are both failed.</p>
<p><code>install</code> failed because of &quot;cannot re-use a name that is still in use&quot;
but <code>upgrade --install</code> failed because of &quot;xxx has no deployed releases&quot;</p>
<p>Is the only way that I have to remove the history or uninstall without history?</p>
<p>I tried to use <code>install</code> and <code>upgrade --install</code> command, both failed</p>

dayeguilaiye
<p>As described  in this  <a href="https://phoenixnap.com/kb/helm-has-no-deployed-releases" rel="nofollow noreferrer">doc</a> by phoenixnap.</p>
<p><strong>There are several ways to fix  the “helm has no deployed releases” error, one ways is by running the following command</strong>:</p>
<pre><code>kubectl -n kube-system patch configmap [release name].[release version] --type=merge -p '{&quot;metadata&quot;:{&quot;labels&quot;:{&quot;STATUS&quot;:&quot;DEPLOYED&quot;}}}'
</code></pre>
<p>[release name]  is the name of the release you want to update.</p>
<p>[release version]  is the current version of your release.</p>
<p>Since Helm 3 stores the deployment history as <a href="https://phoenixnap.com/kb/kubernetes-secrets" rel="nofollow noreferrer">Kubernetes secrets</a>. Check the deployment secrets:</p>
<pre><code>kubectl get secrets
</code></pre>
<p>Find the secret referring to the failed deployment, then use the following command to change the deployment status:</p>
<pre><code>kubectl patch secret [name-of-secret-related-to-deployment] --type=merge -p '{&quot;metadata&quot;:{&quot;labels&quot;:{&quot;status&quot;:&quot;deployed&quot;}}}'
</code></pre>
<p>You can also refer this <a href="https://jacky-jiang.medium.com/how-to-fix-helm-upgrade-error-has-no-deployed-releases-mystery-3dd67b2eb126" rel="nofollow noreferrer">blog</a> by Jacky Jiang for more information about how to upgrade helm</p>
