Systemd is a system and repair supervisor for Linux working methods, offering a typical course of for controlling what providers begin when the system boots.
Typically, you might must take away a systemd service for varied causes, such because it being now not vital, conflicting with different providers, otherwise you merely need to clear up your system.
Systemd makes use of unit information to handle providers, that are sometimes situated in /and so on/systemd/system/ or /lib/systemd/system/. These unit information outline how the service ought to begin, cease, and behave.
Eradicating a systemd service includes stopping the service, disabling it so it doesn’t begin on boot, after which deleting its unit file.
This information will stroll you thru the steps to take away systemd providers in Linux.
Figuring out Systemd Service
First, you should establish the precise title of the service you want to take away by itemizing all of the lively providers utilizing the next command.
systemctl list-units –type=service
Or, if you already know the service title or part of it, you need to use.
systemctl | grep <service-name>
Stopping and Disabling Systemd Service
Earlier than eradicating a service, it’s vital to cease it whether it is at the moment operating by utilizing the next systemctl command.
sudo systemctl cease <service-name>
To stop the service from beginning mechanically on boot, you should disable it.
sudo systemctl disable <service-name>
Eradicating Systemd Service
Lastly, take away the service’s unit file from the system, which is often situated in /and so on/systemd/system/ or /lib/systemd/system/ utilizing the rm command to delete the file.
sudo rm /and so on/systemd/system/<service-name>.service
Or, if it’s situated within the different listing.
sudo rm /lib/systemd/system/<service-name>.service
After eradicating the unit file, reload the systemd configuration to replicate the modifications.
sudo systemctl daemon-reload
Conclusion
Eradicating systemd providers on Linux includes stopping the service, disabling it from beginning on boot, and deleting its unit file.
All the time confirm that the service is now not wanted and that you’ve got the mandatory permissions to carry out these actions.