---
myst:
html_meta:
"description lang=en": "Kasm Workspaces uninstall instructions."
"keywords": "Kasm, Uninstall, Server, Setup"
"property=og:locale": "en_US"
---
```{title} Uninstall
```
# Uninstall
- Stop All Kasm services.
```bash
sudo /opt/kasm/current/bin/stop
```
- Remove any Kasm session containers.
```bash
sudo docker rm -f $(sudo docker container ls -qa --filter="label=kasm.kasmid")
```
```{note}
If there are no session containers to remove, you will get an error that “docker rm requires at least 1 argument”, which means that the command ran successfully
```
- Remove Kasm service containers.
```bash
export KASM_UID=$(id kasm -u)
export KASM_GID=$(id kasm -g)
sudo -E docker compose -f /opt/kasm/current/docker/docker-compose.yaml rm
```
- Remove the Kasm docker network.
```bash
sudo docker network rm kasm_default_network
```
- Remove the Kasm sidecar docker network plugin.
```bash
plugin_name=$(sudo docker network inspect kasm_sidecar_network --format '{{.Driver}}')
sudo docker network rm kasm_sidecar_network
sudo docker plugin disable $plugin_name
sudo docker plugin rm $plugin_name
sudo rm -rf /var/log/kasm-sidecar
sudo rm -rf /var/run/kasm-sidecar
```
- Remove the Kasm database docker volume.
```{parsed-literal}
sudo docker volume rm kasm_db_{{ release }}
```
- Remove the Kasm docker images.
```{parsed-literal}
sudo docker rmi redis:5-alpine
sudo docker rmi postgres:14-alpine
sudo docker rmi kasmweb/nginx:latest
sudo docker rmi kasmweb/share:{{ release }}
sudo docker rmi kasmweb/agent:{{ release }}
sudo docker rmi kasmweb/manager:{{ release }}
sudo docker rmi kasmweb/api:{{ release }}
sudo docker rmi $(sudo docker images --filter "label=com.kasmweb.image=true" -q)
```
- Remove the Kasm installation directory structure.
```bash
sudo rm -rf /opt/kasm/
```
- Remove the Kasm User Accounts.
```bash
sudo deluser kasm_db
sudo deluser kasm
```