LazyCodet

a

12:47:33 16/4/2024 - 1 views -
VPS, Linux

Remove a service systemd in Linux

First, check the list of units including the service name you want to remove:

systemctl list-units --type=service

Remove a service systemd in Linux

systemctl stop [servicename]
systemctl disable [servicename]
sudo rm /etc/systemd/system/[servicename].service
systemctl daemon-reload
systemctl reset-failed

​Replace [servicename] with your service name want to remove

​You can check with the command below:

systemctl list-units --type=service

​The output returns a list of name services excluding your service name

​References

https://superuser.com/questions/513159/how-to-remove-systemd-services