Uninstalling the agent systemd service
You can uninstall an agent running as a systemd service when the agent is no longer required.
Before you begin
- Ensured that you have the necessary permissions to uninstall agents.
- Stopped the active deployments or tasks that are currently running on the agent.
- Removed the agent service from assigned environments.
- You must be a root user.
About this task
To uninstall the agent service, you must stop the agent, disable the automatic startup setting, and remove the associated service unit file.
Procedure
- Log in to the agent host machine.
-
Stop the agent by using the following command:
$ sudo systemctl stop devops-deploy-agent -
Disable the automatic startup setting of the agent by using the following
command:
$ sudo systemctl disable devops-deploy-agent -
Remove the service unit file by using the following command:
$ sudo rm /etc/systemd/system/devops-deploy-agent.service -
Reload the systemd configuration to check agent status by using the following
command:
$ sudo systemctl daemon-reload