KOTS Admin Console stores two kinds of archives that grow unbound over the life of an installation: support bundles (metadata in Kubernetes Secrets, archives in object storage such as MinIO) and application version archives (one per version you pull, upload, or sync from a channel). As these accumulate, they can lead to:
- Performance degradation
- Potential out-of-memory (OOM) events
- Disk space shortages
Previously the only options were to delete bundles one at a time from the Admin Console UI, or to clean object storage manually with `kubectl` and `mc`. Starting in **KOTS v1.130.9**, the Admin Console can do this for you: an opt-in cleanup policy automatically prunes old support bundles and app versions on a schedule, keeping a configurable number of the newest of each per app. This guide explains how to enable and tune it.
**
Warning**: Pruning permanently deletes support bundle and app version archives from both Kubernetes and object storage. This cannot be undone. Download any support bundles you still need before enabling it. The currently-deployed app version and any newer versions are never deleted.
Prerequisites
- KOTS Admin Console v1.130.9 or later
kubectlaccess to your Kubernetes cluster- Proper permissions to edit ConfigMaps and restart deployments in the KOTS namespace
How it works
When enabled, the Admin Console runs a prune pass for every installed app:
- Keeps the newest *N* support bundles and deletes the rest.
- Keeps the newest *M* app versions older than the currently-deployed one and deletes the rest.
A pass runs once immediately when the Admin Console starts (to clear any existing backlog) and then once per day afterward. Each deletion removes both the metadata record and the backing archive in object storage, so disk is actually reclaimed. It is disabled by default.
The currently-deployed version, any version newer than the deployed one (for example a pulled-but-not-yet-deployed release), and everything within your retention counts. Only versions older than what is deployed, beyond the retention count, are eligible.
## Step 1: Set your namespace
Point at the namespace where the Admin Console runs (commonly kotsadm
export NAMESPACE=<namespace>
## Step 2: Enable pruning on the kotsadm ConfigMap
The policy is configured on the ``kotsadm-confg` ConfigMap. Add the prune keys:
kubectl -n $NAMESPACE patch configmap kotsadm-confg --type merge -p '
data:
prune-enabled: "true"
prune-support-bundle-count: "25"
prune-app-version-count: "50"
'
## Step 3: Restart the Admin Console
The configuration is read only when the Admin Console starts, so restart the pod to apply it. The first prune pass runs immediately after it comes back up.
kubectl -n $NAMESPACE rollout restart deployment kotsadm
kubectl -n $NAMESPACE rollout status deployment kotsadm
## Verifying Changes
Every deletion is logged with the app ID and the sequence or bundle ID. Check the logs:
kubectl -n $NAMESPACE logs deployment/kotsadm | grep -i prune
e.g.
prune enabled: retaining 25 support bundles and 50 app versions per app
prune: deleting support bundle 2whlz1oeebtpazvjwbiyggp3sf0 for app <app-id>
prune: deleting app version for app <app-id> sequence 42
If pruning is enabled but nothing is being deleted, that is expected — it means no app has exceeded its retention count yet.
After the pass completes, verify that:
- The KOTS Admin Console still functions properly
- Your application can still be managed normally
- Disk space has been reclaimed
## Disabling pruning
Set prune-enabled back to "false" and restart the Admin Console. No further deletions occur; anything already pruned is gone.
FAQ
Does this delete registry images or backups? No. Only support bundle and app version archives - container images and snapshot/Velero backups are untouched.
Can it delete the version I have running? No. The deployed version and anything newer are always protected, regardless of your retention count.
Can I change the daily schedule? No. The cadence is fixed (once at startup, then daily); only the enable switch and the two retention counts are tunable.
Is this in the Admin Console UI? Not currently - it is configured only via the ConfigMap as shown above.