Like a single command that deletes everything associated with a unit name?
I think you need two commands, one to dissociate the unit and one to erase the unit file.
the files and symbol links systemd creates automatically after I run systemd enable
You mean systemctl enable ...
. Anyway, from man systemctl
:
disable [NAME...]
Disables one or more units. This removes all symlinks to the specified unit files from the unit configuration directory, and hence undoes the changes made by enable. Note however that this removes all symlinks to the unit files (i.e. including manual additions), not just those actually created by enable. This call implicitly reloads the systemd daemon configuration after completing the disabling of the units. Note that this command does not implicitly stop the units that is being disabled.
The symlinks are there to associate the unit with a target -- this is the same as the symlinks used in sysV rcN.d
runlevel directories.1 Disabling a unit removes those, since they are what "enable" it be run with whatever target(s).
Once those are gone, the only thing that is left is the .service
file you presumably created. Erase/remove that and you're done.
1. To be clear: you're not using sysV so if that observation meant nothing to you, don't worry about it. There may be /etc/rcN.d
directories on your system, ignore them.
systemd enable <service_name>
.