Uninstalling DNClient Server
This guide describes how to uninstall the dnclient binary and all associated config files on a machine.
Package installations
Section titled “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/definedsudo apt-get remove dnclient# Or purge, which also deletes /var/lib/defined and /etc/default/dnclientsudo apt-get purge dnclientAny 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.newNetworkTo stop receiving updates, also remove the repository definition:
sudo rm /etc/apt/sources.list.d/defined-net.list /etc/apt/keyrings/defined-net.ascsudo dnf remove dnclient# Removal leaves enrollment state behind; delete it if you're done with the hostsudo rm -r /var/lib/definedIf you edited /etc/sysconfig/dnclient, rpm preserves your copy as /etc/sysconfig/dnclient.rpmsave. Any environment file you created for a named instance isn’t owned by the package and is left in place:
sudo rm -f /etc/sysconfig/dnclient.rpmsave /etc/sysconfig/dnclient.newNetworkTo stop receiving updates, also remove the repository definition:
sudo rm /etc/yum.repos.d/defined-net.repo# pacman doesn't stop services on removal, so disable it firstsudo systemctl disable --now dnclient# -n deletes /etc/conf.d/dnclient rather than keeping it as a .pacsave filesudo pacman -Rns dnclient# Removal leaves enrollment state behind; delete it if you're done with the hostsudo rm -r /var/lib/definedAny environment file you created for a named instance isn’t tracked by pacman:
sudo rm -f /etc/conf.d/dnclient.newNetworkStandalone binary installations
Section titled “Standalone binary installations”sudo dnclient stopsudo dnclient uninstallrm $(which dnclient)# To remove state files:sudo rm -r /var/lib/defined/# service managers like systemd will auto-delete logssudo dnclient stopsudo dnclient uninstallrm $(which dnclient)# To remove config / log files:sudo rm /etc/defined/config.yml /etc/defined/dnclient.ymlsudo rm -r /etc/defined/sudo rm /usr/local/var/log/dnclient.*.logWindows
Section titled “Windows”On Windows you have two choices:
- Find the app (
Defined Networking ClientorDNClient Serverdepending 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.