Skip to main content

Uninstalling DNClient Server

This guide describes how to uninstall the dnclient binary and all associated config files on a machine.

Linux

Package installations

If you installed dnclient from a package, remove it with your package manager. On APT and RPM, removing the package stops the service.

If you enabled any named instances, disable each one first so its systemd symlinks don't outlive the package:

sudo systemctl disable --now dnclient@newNetwork
# Remove the package, keeping enrollment state in /var/lib/defined
sudo apt-get remove dnclient
# Or purge, which also deletes /var/lib/defined and /etc/default/dnclient
sudo apt-get purge dnclient

Any environment file you created for a named instance belongs to you rather than the package, so even a purge leaves it behind:

sudo rm -f /etc/default/dnclient.newNetwork

To stop receiving updates, also remove the repository definition:

sudo rm /etc/apt/sources.list.d/defined-net.list /etc/apt/keyrings/defined-net.asc

Standalone binary installations

sudo dnclient stop
sudo dnclient uninstall
rm $(which dnclient)
# To remove state files:
sudo rm -r /var/lib/defined/
# service managers like systemd will auto-delete logs
note

DNClient 0.9.4 moved the Linux state directory from /etc/defined to /var/lib/defined. A host that enrolled before 0.9.4 and upgraded in place keeps using /etc/defined, because DNClient falls back to the old directory when the new one holds no enrolled networks. This applies to package installations too, if the host first enrolled under an older standalone binary. Check both locations, and remove /etc/defined/ too if it's still there.

macOS

sudo dnclient stop
sudo dnclient uninstall
rm $(which dnclient)
# To remove config / log files:
sudo rm /etc/defined/config.yml /etc/defined/dnclient.yml
sudo rm -r /etc/defined/
sudo rm /usr/local/var/log/dnclient.*.log

Windows

On Windows you have two choices:

  • Find the app (Defined Networking Client or DNClient Server depending on the version) in "Add or remove programs" in Control Panel and delete the application. This will delete the app and remove all associated config files.
  • Download the installer again from https://admin.defined.net/downloads, and use the built-in uninstaller.

Both uninstall methods will remove the installation directory, which contains the config files for any enrolled networks.