How to remove service from systemd?

In this post, we will learn to remove service from systemd.

  1. Stop the service
sudo systemctl stop <service-name>
  1. Disable the service
sudo systemctl disable <service-nama>
  1. Remove service file

Most of the cases your service file will be inside /etc/systemd/system/ directory

sudo rm /etc/systemd/system/<service-name>
  1. Reload the daemon
sudo systemctl daemon-reload

By following the steps it will remove the service from systemd.

Leave a Reply

Inline Feedbacks
View all comments
Would love your thoughts, please comment.x