Skip to main content

atscalectl uninstall

The uninstall command removes an AtScale Helm release and its Kubernetes resources from the cluster. The command communicates directly with the Kubernetes and Helm APIs. It does not require Helm to be installed on the machine running atscalectl.

Warning

This command is destructive. It removes the AtScale deployment from the cluster. Confirmation is required unless the --yes flag is provided.

Important: Persistent volumes are not removed​

uninstall removes the Helm release and Kubernetes resources managed by Helm, but it does not remove PersistentVolumeClaims (PVCs) created by StatefulSets. It is not a storage cleanup operation.

Specifically, after uninstalling, database data remains available, and storage continues to be allocated. Reinstalling into the same namespace may reuse the existing volumes and recover the previous database contents.

If you need a completely clean installation, PersistentVolumeClaims must be removed separately.

Important

Deleting PersistentVolumeClaims permanently removes the data stored on those volumes. This is a manual action and is intentionally not performed by the uninstall command.

What is removed and what remains​

The uninstall command removes the following:

  • AtScale Helm release resources
  • Kubernetes workloads
  • Services
  • ConfigMaps and Secrets managed by the release
  • Other Kubernetes resources owned by the Helm release

It does not remove:

  • PersistentVolumeClaims
  • PersistentVolumes
  • External databases
  • External cloud resources

Review your environment before uninstalling if any of these resources are managed outside Helm.

Prerequisites​

The uninstall command requires the secrets list Kubernetes permission, only when the --release-name flag isn't specified. This is required to detect the Helm release.

Usage​

atscalectl uninstall [flags]

Flags​

uninstall supports all global flags. The following may be especially useful:

  • -n, --namespace
  • --context
  • --release-name

Additionally, uninstall supports the following command-specific flags.

FlagDefaultDescription
-y, --yesfalseSkips the confirmation prompt.
--dry-runfalseSimulates the uninstall without deleting anything.
--keep-historyfalseRetains Helm release history instead of purging it.
--waitfalseWaits until resources are deleted before returning.
--timeout5mThe maximum time to wait when using --wait.

Before uninstalling​

Before removing an AtScale deployment:

  1. Create a backup:

    atscalectl backup --mode full
    Note

    A backup is recommended even though database volumes normally survive uninstall, because accidental volume removal or targeting the wrong environment cannot be recovered.

  2. Verify the target cluster:

    atscalectl status --context <context>
  3. Preview the uninstall:

    atscalectl uninstall --dry-run

Confirmation prompt​

Without the --yes flag, the command asks for confirmation:

WARNING: This will uninstall the Helm release "atscale" from namespace "atscale".
Continue? [y/N]

Only y continues. Any other input, including an empty line, aborts the operation without making any changes.

Note

The --dry-run flag does not ask for confirmation because it does not perform any changes.

Release detection​

The Helm release name is automatically detected when the namespace contains exactly one Helm release. For example:

namespace: atscale

helm releases:
- atscale

If multiple releases exist, the command stops with the following message:

could not auto-detect release name: multiple helm releases found in namespace "atscale": [atscale test] — specify --release-name

If this occurs, specify the release explicitly:

atscalectl uninstall --release-name <name>

This is especially important when uninstalling, as selecting the wrong release removes the wrong deployment.

Waiting for completion​

By default, uninstall returns after Helm has issued the deletion request. Kubernetes resources may still be terminating when the command exits.

If the the next operation depends on resource removal being complete, such as reinstalling into the same namespace, include the --wait flag:

atscalectl uninstall --wait

You can also increase the timeout for larger deployments:

atscalectl uninstall --wait --timeout 15m
Note

A timeout does not roll back the uninstall. Resource deletion continues in Kubernetes.

Helm release history​

By default, Helm release history is removed completely. If you want to keep the Helm release record and only mark it as uninstalled, specify the --keep-history flag:

atscalectl uninstall --keep-history

This can be useful for audit purposes, reviewing previous deployments, and release management workflows.

Output​

uninstall outputs a table similar to the following:

┌─────────┬───────────────────────────────┬─────────┐
│ RELEASE │ DESCRIPTION │ DRY_RUN │
├─────────┼───────────────────────────────┼─────────┤
│ atscale │ Uninstallation complete │ false │
└─────────┴───────────────────────────────┴─────────┘

The table contains the following information.

ColumnDescription
RELEASEThe Helm release that was targeted.
DESCRIPTIONThe result reported by Helm.
DRY_RUNWhether the operation was only simulated.

All standard output formats are supported. For example:

atscalectl uninstall -o json

After uninstalling​

After uninstalling, you should do the following:

  1. Confirm the deployment was removed:

    atscalectl status
  2. Decide whether PersistentVolumeClaims should be kept or removed.

  3. Keep your backup until the environment is no longer required.

Uninstall usage examples​

Preview the uninstall without making changes​

atscalectl uninstall --dry-run

Interactive uninstall​

atscalectl uninstall

Unattended uninstall​

atscalectl uninstall --yes

Wait until Kubernetes finishes removing resources​

atscalectl uninstall --wait --timeout 10m

Remove a specific release from a specific namespace:​

atscalectl uninstall \
--context <context> \
--namespace <namespace> \
--release-name <name>

Keep Helm release history​

atscalectl uninstall --keep-history

Troubleshooting uninstallations​

Operation is aborted​

If the operation is aborted with an aborted message, it means the confirmation prompt was cancelled, and nothing was changed.

You can rerun the operation with the --yes flag for an unattended execution:

atscalectl uninstall --yes

Multiple Helm releases found​

If you receive a multiple helm releases found error, it means more than one Helm release exists in the namespace. Rerun the command with the --release-name flag:

atscalectl uninstall --release-name <name>

You can also use --dry-run first to confirm the target.

Release not found​

If you receive a release not found error, then the release does not exist in the selected namespace. Verify the Kubernetes context, namespace, and release name before rerunning uninstall.

--wait flag times out​

If the --wait flag times out, it means resources are still terminating. You can try increasing the timeout:

atscalectl uninstall --wait --timeout 15m
Note

A timeout does not cancel the uninstall. Check the cluster again with the status command.

Storage is still allocated after uninstall​

This is expected behavior. PersistentVolumeClaims are intentionally preserved and must be removed manually if you want to delete the stored data.