# Troubleshoot KOTS

This topic provides troubleshooting information for common issues with KOTS installations.

:::note
Replicated KOTS is available only for existing customers. For supporting installations into customer managed clusters, we recommend Helm. For more information, see [About Helm Installations with Replicated](/vendor/helm-install-overview).

KOTS is a Generally Available (GA) product for existing customers. For more information about the Replicated product lifecycle phases, see [Support Lifecycle Policy](/vendor/policies-support-lifecycle).
:::

## Admin Console storage grows over time {#admin-console-storage}

### Symptom

The storage that the Admin Console uses keeps growing. For example, the object store (MinIO, or Rook/Ceph on some kURL installations), or the Admin Console volume in installations without object storage, runs low on space or fills up.

### Cause

KOTS keeps an archive of every application version, including each version that is pulled, uploaded, or synced from a channel. KOTS also keeps every support bundle that is collected through the Admin Console. By default, KOTS does not delete these archives, so they accumulate over time.

### Solution

KOTS 1.130.9 and later include an opt-in prune policy. When the prune policy is enabled, KOTS deletes old support bundles and application version archives on a schedule. The prune policy is disabled by default. You configure it directly on the `kotsadm-confg` ConfigMap. There is no Admin Console UI or KOTS CLI command for it.

Replicated recommends enabling the prune policy for installations where Admin Console storage is running low.

:::important
Pruning permanently deletes support bundles and application version archives from Admin Console storage. You cannot recover them. Pruned versions are also removed from the version history, so you cannot roll back to or redeploy them. Before you enable the prune policy, download any support bundles that you want to keep, and set `prune-app-version-count` high enough to keep the versions you might roll back to.
:::

#### How pruning works

When the prune policy is enabled, the Admin Console does the following for each installed application:

* Keeps the newest support bundles, up to the support bundle count, and deletes the rest.
* Never deletes the deployed version or any version with a higher sequence, such as a version that is downloaded but not yet deployed.
* Of the versions with a lower sequence than the deployed version, keeps the newest ones, up to the application version count, and deletes the rest. Versions are ordered by sequence, not by version label. For example, a backport release that was pulled before the deployed version is treated as older, even if its version label is higher.

The Admin Console runs a prune pass when it starts, and then daily. Each deletion removes both the record and the archive, so the storage is reclaimed. Pruning does not delete container images or snapshots.

#### Enable pruning

To enable pruning:

1. Set the namespace where the Admin Console is installed:

    ```bash
    export NAMESPACE=NAMESPACE
    ```

    Where `NAMESPACE` is the namespace where the Admin Console is installed. For example, `default` for kURL or `kotsadm` for Embedded Cluster v2. For existing cluster installations, use the namespace you installed into.

1. Add the prune keys to the `kotsadm-confg` ConfigMap:

    ```bash
    kubectl -n $NAMESPACE patch configmap kotsadm-confg --type merge -p '{"data":{"prune-enabled":"true","prune-support-bundle-count":"25","prune-app-version-count":"50"}}'
    ```

    The following table describes the keys:

    | Key | Description |
    |---|---|
    | `prune-enabled` | Set to `"true"` to enable the prune policy. Default: `"false"`. A value that is not `"true"` or `"false"`, such as `"yes"`, leaves pruning disabled and does not log a warning. |
    | `prune-support-bundle-count` | The number of support bundles to keep for each application. Default: `"25"`. |
    | `prune-app-version-count` | The number of application versions older than the deployed version to keep for each application. Default: `"50"`. |

    If a count is not a whole number of 0 or greater, the Admin Console logs a warning and uses the default for that key.

1. The Admin Console reads the prune keys only when it starts. Restart the Admin Console to apply them. Depending on the installation, the Admin Console runs as a Deployment or a StatefulSet. Check which one your installation uses:

    ```bash
    kubectl -n $NAMESPACE get deployment,statefulset kotsadm
    ```

    The command returns a `NotFound` error for the resource type that your installation does not use. This is expected.

    Then restart it:

    ```bash
    kubectl -n $NAMESPACE rollout restart deployment/kotsadm
    kubectl -n $NAMESPACE rollout status deployment/kotsadm
    ```

    The `rollout status` command returns when the restarted Admin Console pod is ready. For a Deployment, the output ends with `deployment "kotsadm" successfully rolled out`. For a StatefulSet, it ends with `statefulset rolling update complete`.

    For a StatefulSet, use `statefulset/kotsadm` instead of `deployment/kotsadm`.

1. Confirm in the Admin Console logs that the prune policy is enabled:

    ```bash
    kubectl -n $NAMESPACE logs deployment/kotsadm | grep prune
    ```

    For a StatefulSet, use `statefulset/kotsadm` instead of `deployment/kotsadm`.

    **Example output with both counts set to `"1"`:**

    ```
    {"level":"info","ts":"2026-11-20T18:52:56Z","msg":"prune enabled: retaining 1 support bundles and 1 app versions per app"}
    {"level":"info","ts":"2026-11-20T18:52:56Z","msg":"prune: deleting app version for app 3MNnZCrnAgUgziRy0jM4ZbEnT3Z sequence 1"}
    {"level":"info","ts":"2026-11-20T18:52:57Z","msg":"prune: deleting support bundle 3mno0kjsbm5c3nfs3x2qzekd1rn for app 3MNnZCrnAgUgziRy0jM4ZbEnT3Z"}
    ```

    The first prune pass runs in the background, so deletion lines can appear a few seconds after the `prune enabled` line. If no deletion lines appear, either no application has more support bundles or older versions than the counts allow, or the application has no deployed version yet. KOTS does not prune versions for an application with no deployed version.

#### Disable pruning

To disable pruning, set `prune-enabled` to `"false"` in the `kotsadm-confg` ConfigMap and restart the Admin Console. Archives that were already deleted are not restored.

## Additional resources

* [Install KOTS in existing clusters without object storage](/enterprise/installing-stateful-component-requirements)
* [Generate support bundles from the Admin Console](/enterprise/troubleshooting-an-app)