How can I delete the overrides file for a systemd unit?
I tried systemctl edit myunit
, deleting all the text, then saving, but that appears to have no effect, with an error message ending with canceled: temporary file is empty.
.
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. It only takes a minute to sign up.
Sign up to join this communityThe appropriate command is systemctl revert
, which will revert the given unit to its vendor configuration, deleting all overrides. (It will also restore the unit’s properties to their defaults, and unmask it if it was masked by the administrator.)
If you want the settings to be applied immediately, you need to restart the service (systemctl restart
).