I used sudo systemctl edit name.service
to edit a service, now I no longer need these modifications and I wish to restore it to its default setting.
How can I restore it?
I'm running Ubuntu 16.04.
I used sudo systemctl edit name.service
to edit a service, now I no longer need these modifications and I wish to restore it to its default setting.
How can I restore it?
I'm running Ubuntu 16.04.
If you're running a version of
systemd
higher than of "229", then you can simply use:From github commit:
Ubuntu 16.04 uses "systemd version 229", so you should remove override file manually:
Then reload systemd daemon and restart your service:
Remember that if you used
--full
withedit
subcommand to copy the original unit instead of creating a drop-in file, then you should remove/etc/systemd/system/name.service
instead of the directory.