helm uninstall: Command Reference for CI/CD
Remove a release and the resources it created.
helm uninstall deletes a release and the objects Helm installed for it. In CI it tears down per-PR preview environments. This reference covers the flags that control history retention and blocking behaviour.
Common flags and usage
- uninstall <release>: delete the release and its resources
- --namespace <ns>: scope to the release namespace
- --keep-history: retain release history for later inspection
- --wait: block until resources are fully removed
- --ignore-not-found: do not error if the release is absent (idempotent)
Example
shell
helm uninstall web-pr-${PR_NUMBER} \
--namespace previews --ignore-not-found --waitIn CI
Use --ignore-not-found so a teardown job is idempotent and does not fail when the release was already removed. --wait ensures resources are gone before the step returns, which matters if you then delete the namespace. uninstall does not remove a namespace it did not create.
Key takeaways
- --ignore-not-found keeps teardown jobs idempotent.
- --wait blocks until resources are actually gone.
- uninstall does not delete a namespace it did not create.
Related guides
Helm Cheat Sheet: Charts, Releases & UpgradesA Helm cheat sheet - install, upgrade, rollback, template, repo, and dependency commands for managing Kuberne…
helm install: Command Reference for CI/CDReference for helm install: install a chart as a release, set values, and use --wait and --atomic so a failed…
helm upgrade: Command Reference for CI/CDReference for helm upgrade: update a release or install it if absent with --install, atomic rollback, --wait…
helm rollback: Command Reference for CI/CDReference for helm rollback: revert a release to a previous revision, find the target with helm history, the…