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..

up vote 2 down vote accepted

The 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.)

  • I found I could manually delete the files as mentioned in the manpage section you linked and then run systemctl daemon-reload but this is clearly the canonical way to do it. Thanks :) – Winny Jun 11 at 12:42

Your Answer

 

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.