Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

If I install a new service then decide I don’t want that application anymore and delete it, the service is still listed in the output from systemctl as error.

Where is this coming from and how can I remove them thoroughly?

share|improve this question
up vote 10 down vote accepted

Sounds like you uninstalled it, but didn't remove the systemd hook:

# systemctl disable [servicename]

share|improve this answer

My recipe for service obliteration (be careful with the rm statements!)

systemctl stop [servicename]
systemctl disable [servicename]
rm /etc/systemd/system/[servicename]
rm /etc/systemd/system/[servicename] symlinks that might be related
systemctl daemon-reload
systemctl reset-failed
share|improve this answer

You are probably looking for reset-failed:

$ sudo systemctl reset-failed
$

From the systemd man page:

reset-failed [PATTERN...]

Reset the "failed" state of the specified units, or if no unit name is passed, reset the state of all units. When a unit fails in some way (i.e. process exiting with non-zero error code, terminating abnormally or timing out), it will automatically enter the "failed" state and its exit code and status is recorded for introspection by the administrator until the service is restarted or reset with this command.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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