> ## Documentation Index
> Fetch the complete documentation index at: https://anaconda.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Uninstalling Workbench and K3s

noindex: true

This page provides step-by-step instructions for removing Workbench along with K3s from your cluster cleanly and safely.

## Cleaning up after pre-installation

If Workbench is not installed, but you have run `./k3s_preinstall.sh`, the only changes that have been made to your system are the staging of installation asset files, which consume a small amount of space. If you want to remove those files, run the following commands:

```sh theme={null}
sudo rm -rf /etc/rancher/k3s /var/lib/rancher/k3s /usr/local/bin/k3s
sudo mv /etc/environment.k3s-orig /etc/environment
```

## Uninstalling

To uninstall Workbench and K3s from your cluster:

1. If Workbench is running, you’ll need to perform a backup before proceeding. This ensures that no data corruption occurs during the K3s shutdown process. Perform a backup by running the following command:

   ```sh theme={null}
   ae_backup.sh
   ```
2. Pause the application by running the following command:

   ```sh theme={null}
   ae_pause.sh

   ```
3. If your cluster has worker nodes, uninstall them by running the following command on each node:

   ```sh theme={null}
   /usr/local/bin/k3s-agent-uninstall.sh
   ```
4. Uninstall K3s by running the following commands on the server:

   ```sh theme={null}
   /usr/local/bin/k3s-uninstall.sh
   sudo mv /etc/environment.k3s-orig /etc/environment
   ```

   This does not remove existing Workbench data (data stored in `/opt/anaconda/storage`). If you would like to remove this data, perform the [pre-installation cleanup commands](#cleaning-up-after-pre-installation).
