Uninstalling
Removal is built in and works from either side: one command on the host, or a Remove click in the console. Both end the same way: the host is deregistered on the server, the service is removed, and the files and the binary are gone.
On the host
wakora uninstall
It asks you to type the hostname to confirm (skip with --force), then:
- deregisters on the server (the per-server key is revoked and the host's stored telemetry is purged),
- stops and removes the service, whatever the init system (systemd, OpenRC, sysvinit, launchd, Windows SCM),
- wipes
/etc/wakora,/var/lib/wakora,/var/log/wakora(on Windows,%ProgramData%\Wakora), - deletes its own binary.
If the server is unreachable at that moment, the local removal still completes; revoke the host in the console when convenient.
From the console
Removing a host in the console does the same thing remotely: the server revokes the key and purges telemetry, and the live agent receives an uninstall order signed with the publisher key. The agent verifies the signature and accepts the order only for its own UUID, so neither a compromised connection nor a mixed-up server can wipe the wrong box. The agent then removes itself exactly as above.
An agent that was removed while offline learns about it on reconnect: the server answers "deregistered", and the agent idles quietly with its identity intact rather than retrying forever. It never self-wipes on that signal alone, only on the signed order. Re-enrolling the box later with a team key just works and mints a fresh identity.
The APM exception
If an applied APM change still references the agent's artifact directory (the PHP prepend is read by the web server on every request), that directory is deliberately left in place and the uninstall says so, because deleting it would break the site. Detach APM from the console first (a reload applies the removal), then the directory is removed normally. Artifacts that were only downloaded but never applied are wiped without ceremony.
Revoke the key
Removing the host in the console revokes its per-server key, so even a leftover copy of the identity cannot reconnect. Do this whenever you decommission a host, even if you already cleaned it manually.