How to remove a systemd service from Linux – CentOS / RHEL / Ubuntu ?

The following steps will help you to remove a systemd service from a Linux system. The below steps will remove the entry from system service.

systemctl stop [servicename]
systemctl disable [servicename]
rm /etc/systemd/system/[servicename]
rm /etc/systemd/system/[servicename] # and symlinks that might be related
rm /usr/lib/systemd/system/[servicename] 
rm /usr/lib/systemd/system/[servicename] # and symlinks that might be related
systemctl daemon-reload
systemctl reset-failed

After doing the above steps, we need to uninstall / remove the software from the system.