This guide walks you through fully removing a Midaz deployment from Kubernetes. A standardDocumentation Index
Fetch the complete documentation index at: https://docs.lerian.studio/llms.txt
Use this file to discover all available pages before exploring further.
helm uninstall removes the Helm-managed resources, but several persistent resources — PersistentVolumeClaims, Secrets, ConfigMaps, and the namespace itself — are intentionally left behind to prevent accidental data loss. This page covers how to clean them up completely when needed.
Prerequisites
Before uninstalling, back up your current Helm values so you can reinstall with the same configuration if needed:
Uninstalling the Helm release
Run the following command to uninstall the Midaz Helm release:
Cleaning up persistent resources
PersistentVolumeClaims
PVCs hold your database volumes and are never removed byhelm uninstall. List them first to confirm what exists:
Deleting PVCs permanently destroys the underlying volume data for PostgreSQL, MongoDB, and any other stateful dependency. Make sure database backups are in place before running this command.
Secrets
Secrets created outside the Helm release lifecycle (e.g.,kubectl create secret) are not removed by helm uninstall. List all secrets in the namespace and identify any that are no longer needed:
ConfigMaps
ConfigMaps created manually or by bootstrap jobs may also remain. List them:Namespace cleanup
Once all resources inside the namespace have been removed, delete the namespace itself:
Deleting the namespace will forcefully remove any remaining resources inside it. If a resource is stuck in
Terminating state, you may need to remove its finalizers manually.Complete cleanup
For staging, evaluation, or CI environments where a full teardown is safe, the following script automates the entire process:
Data loss is permanent. Run this only in environments where you have confirmed backups or where data loss is acceptable (staging, evaluation, CI). Do not run this in production without a full backup and team sign-off.
midaz-cleanup.sh, make it executable (chmod +x midaz-cleanup.sh), and run it with ./midaz-cleanup.sh.
Production considerations
Uninstall plugins before the core release:
Related resources
- Deploy Midaz using Helm — Installation guide if you need to reinstall
- Upgrading Midaz and plugins via Helm — Upgrade and rollback procedures
- Troubleshooting — Diagnose issues before deciding to uninstall
- Version compatibility — Version mapping reference

