How to uninstall Clavda from Linux, Windows, macOS and ESP32
Remove the Clavda agent completely: stop the service, delete its files, erase an ESP32's stored identity, and delete the device so its credentials stop working.
Updated 2 min read
Removing Clavda takes two steps: remove the agent from the machine, then delete the device record so its credentials stop working everywhere.
Linux
With one command
The Uninstall tab in the device's Generate Setup Commands panel gives a command that stops the service, removes the unit and deletes the install directory. It uses the same root or non-root selector as the installer:
curl -fsSL "https://<api-host>/s/uninstall?m=root" | sudo sh
curl -fsSL "https://<api-host>/s/uninstall?m=user" | sh
The command carries no credentials and never expires, and it is safe to run twice: on a machine that is already clean, it simply finishes. It removes /opt/clavda, ~/clavda, and a custom CLAVDA_INSTALL_DIR if you set the same variable when you run it.
By hand
If the machine cannot reach the Clavda API, or you want to see exactly what is removed, do it by hand. For a system-wide install:
sudo systemctl stop clavda.service
sudo systemctl disable clavda.service
sudo rm -f /etc/systemd/system/clavda.service
sudo systemctl daemon-reload
sudo systemctl reset-failed
sudo rm -rf /opt/clavda
For a non-root install:
systemctl --user stop clavda.service
systemctl --user disable clavda.service
rm -f ~/.config/systemd/user/clavda.service
systemctl --user daemon-reload
rm -rf ~/clavda
# only if lingering was enabled for the install
sudo loginctl disable-linger $USER
Confirm nothing is left
systemctl status clavda.service # should report "could not be found"
pgrep -af clavda-client # should print nothing
ls /opt/clavda ~/clavda 2>/dev/null # should print nothing
Windows
For the command-line agent, open an elevated Command Prompt. Stop the agent, remove the autostart task if you created one, and delete the folder:
taskkill /IM clavda-client-windows-amd64.exe /F
schtasks /delete /tn "clavda Agent" /f
rmdir /s /q C:\clavda
In PowerShell, replace the last line with Remove-Item -Recurse -Force C:\clavda.
For the desktop app, uninstall it from Settings → Apps, then delete its data folder, %LOCALAPPDATA%\com.codegen.clavda-desktop-app, which holds the device's config and keys.
macOS
For the command-line agent:
launchctl unload ~/Library/LaunchAgents/com.clavda.client.plist
rm -f ~/Library/LaunchAgents/com.clavda.client.plist
pkill -f clavda-client
rm -rf ~/clavda
For the desktop app, drag it from Applications to the Bin, then delete ~/Library/Application Support/com.codegen.clavda-desktop-app, which holds the device's config and keys.
ESP32
The board keeps its Clavda identity in NVS, so flashing other firmware does not remove it. Erase the whole flash: in the Arduino IDE, turn on Tools → Erase All Flash Before Sketch Upload and upload, or with PlatformIO:
pio run -t erase
Delete the device record
Removing files stops the device connecting, but the device and its credentials still exist in your account. Open Devices, use the row menu and choose Delete. That invalidates the tokens in any copy of the config file that may still be around, and frees the device's slot on your plan.
Rotate instead of remove
To keep the device but replace its credentials, press Generate Setup Commands again. It mints fresh tokens, and the old config stops working once the new one is installed.
What Clavda installs
The agent is a single self-contained executable. It installs no packages, creates no users, writes nothing under /etc except its own service unit, and leaves nothing in your home directory beyond the folder you chose. A complete system-wide install on Linux is:
| Path | What it is |
|---|---|
/opt/clavda/clavda-client | The agent |
/opt/clavda/.env | Its configuration and credentials, mode 600 |
/etc/systemd/system/clavda.service | The service unit |
A non-root install uses ~/clavda and ~/.config/systemd/user/clavda.service instead. Removing those paths removes Clavda from the machine entirely.