Uninstall
First decommission the host in the portal (its page, Decommission): from then on the service refuses its certificate, so nothing — not even a copy of its key — can check in as it. Then remove the agent.
Installed from the repository
Section titled “Installed from the repository”sudo apt-get remove updawg-agent # Debian, Ubuntu: keeps /etc/updawg and /var/lib/updawgsudo apt-get purge updawg-agent # …and removes them, identity includedsudo rm /etc/apt/sources.list.d/updawg.list /etc/apt/keyrings/updawg.ascsudo dnf remove updawg-agent # RHEL family, Amazon Linuxsudo rm -rf /var/lib/updawg /etc/updawg /etc/yum.repos.d/updawg.repoRemoving stops and disables the service. A removal keeps the host’s identity, so
reinstalling needs no new enrolment; purging (or deleting /var/lib/updawg) does
not.
Installed without a package manager
Section titled “Installed without a package manager”The static binaries, or an agent an earlier one-liner put in
/usr/local/bin:
sudo systemctl disable --now updawgd.servicesudo rm /etc/systemd/system/updawgd.service /usr/local/bin/updawgd /usr/local/bin/updawgctlsudo systemctl daemon-reloadsudo rm -rf /var/lib/updawg /etc/updawg