Skip to content

Uninstall

This page shows how to remove Vesana completely and cleanly — from a single agent to the whole server instance. Pick the section that applies to you; the steps are independent.

Clean order: deregister first, then uninstall

If you only want to remove individual agents/collectors (not the whole instance), first delete the device or collector in the Vesana UI (Host or Collector → Delete). On next contact the server tells the agent/collector to deregister — it stops itself and leaves no "ghost host" behind. Only then remove the binary as described below. If you are removing the entire instance, the order doesn't matter.


Remove the Vesana server instance

The instance runs as a Docker Compose stack under /opt/vesana (default). One command stops all containers and removes volumes (database, Redis, uploads …), images and orphaned containers:

cd /opt/vesana
docker compose -f docker-compose.prod.yml down -v --rmi all --remove-orphans

-v deletes ALL data irreversibly

The -v flag removes the volumes — the entire monitoring database, all history, configuration and in-volume backups are gone afterwards. To keep a copy, first download a full backup via Admin → Maintenance → Backup (see Backup & disaster recovery). Without -v the volumes are kept.

Then delete the install directory:

rm -rf /opt/vesana

Verify nothing is left:

docker ps -a | grep -i vesana        # should be empty
docker volume ls | grep -i vesana    # should be empty
docker images | grep -i vesana       # should be empty

Active collector on the server?

If you installed the Active Collector directly on the server host (systemd service, not in a container), remove it as well — see Remove the active collector.

Other possible leftovers

  • System nginx (bare-metal setups): If you put your own nginx reverse proxy in front of Vesana, remove the Vesana site from /etc/nginx/sites-enabled/ and reload nginx (nginx -s reload).
  • Let's Encrypt certificate: Optionally certbot delete --cert-name <your-domain>.
  • Cron/timers: No system-wide cron jobs are created; nothing to do.

Remove the agent

The agent runs as the systemd service vesana-agent. To uninstall:

# Stop and permanently disable the service
sudo systemctl disable --now vesana-agent

# Remove unit file, binary, config, logs and state
sudo rm -f  /etc/systemd/system/vesana-agent.service
sudo rm -f  /usr/local/bin/vesana-agent
sudo rm -rf /etc/vesana-agent
sudo rm -rf /var/log/vesana-agent
sudo rm -rf /var/lib/vesana-agent

# Reload systemd
sudo systemctl daemon-reload
sudo systemctl reset-failed vesana-agent 2>/dev/null || true

Verify: systemctl status vesana-agent should report "Unit vesana-agent.service could not be found".

A second agent is called vesana-agent-<name> — same steps with the suffix on service, binary and directories.

The agent runs as the Windows service VesanaAgent and is registered as a regular program.

Recommended (GUI): Settings → Apps → Installed apps → "Vesana Agent" → Uninstall. The bundled uninstaller stops the service, removes the program and the registry entry.

Alternative (PowerShell as Administrator):

# Run the NSIS setup's uninstaller (default install path)
& "$env:ProgramFiles\Vesana Agent\uninstall.exe" /S

# If the service unexpectedly remains, remove it forcibly:
Stop-Service VesanaAgent -ErrorAction SilentlyContinue
sc.exe delete VesanaAgent

Remove the configuration too (optional):

Remove-Item -Recurse -Force "$env:ProgramData\Vesana\Agent" -ErrorAction SilentlyContinue
Remove-Item -Recurse -Force "$env:APPDATA\Vesana\Agent"     -ErrorAction SilentlyContinue

Remove the collector

The collector runs as the systemd service vesana-collector.

# Stop and disable the service
sudo systemctl disable --now vesana-collector

# Remove unit file, binary, config and plugins
sudo rm -f  /etc/systemd/system/vesana-collector.service
sudo rm -f  /usr/local/bin/vesana-collector
sudo rm -rf /etc/vesana
sudo rm -rf /opt/vesana-collector

sudo systemctl daemon-reload
sudo systemctl reset-failed vesana-collector 2>/dev/null || true

nmap

The collector installer sets up nmap for network discovery. If you installed it only for Vesana and no longer need it: sudo apt-get remove --purge nmap (or your package manager's equivalent).


Remove the active collector

The active collector runs as its own systemd service vesana-active-collector under the system user vesana-ac.

# Stop and disable the service
sudo systemctl disable --now vesana-active-collector

# Remove unit file, binary, config and state
sudo rm -f  /etc/systemd/system/vesana-active-collector.service
sudo rm -f  /usr/local/bin/vesana-active-collector
sudo rm -rf /etc/vesana-active-collector
sudo rm -rf /var/lib/vesana-active-collector

sudo systemctl daemon-reload
sudo systemctl reset-failed vesana-active-collector 2>/dev/null || true

# Remove the system user (optional)
sudo userdel vesana-ac 2>/dev/null || true

Afterwards

  • Tidy up devices in Vesana: If you removed agents/collectors without deleting them in the UI first, they will show as "offline" / "No Data" for a while. Delete the affected hosts/collectors in the Vesana UI.
  • License/tester mode: There is no activation server to sign off from — removing the instance is all it takes.