Skip to content

Uninstalling DNClient Server

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

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:

Terminal window
sudo systemctl disable --now dnclient@newNetwork
Terminal window
# 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:

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

To stop receiving updates, also remove the repository definition:

Terminal window
sudo rm /etc/apt/sources.list.d/defined-net.list /etc/apt/keyrings/defined-net.asc
Terminal window
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
Terminal window
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

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.