Failed: error: exists /etc/systemd/system/vsts.agent..staging\x2daws\x2dpool.staging\x2daws\x2dagent.service

Error while installing (running sudo ./svc.sh install) vsts.agent service:

Creating launch agent in /etc/systemd/system/vsts.agent.....staging\x2daws\x2dpool.staging\x2daws\x2dagent.service

Failed: error: exists /etc/systemd/system/vsts.agent../.staging\x2daws\x2dpool.staging\x2daws\x2dagent.service

Solution:

The solution is to remove the ‘vsts.agent…..staging\x2daws\x2dpool.staging\x2daws\x2dagent.service’ file.

Go to /etc/systemd/system (cd /etc/systemd/system) and run

sudo rm 'vsts.agent.....staging\x2daws\x2dpool.staging\x2daws\x2dagent.service'

The sudo ./svc.sh install command will work now and will install the agent.