12

I am using Azure DevOps Server (TFS), and I register deployment pool agents in my test and production servers, now iIneed to uninstall or remove the configuration on my server and in my UI how can I do that there are a script to run or just delete the files or what could you please help me with that.

Shayki Abramczyk
  • 36,824
  • 16
  • 89
  • 114
DAQ
  • 141
  • 1
  • 1
  • 8

2 Answers2

18

You need to do 2 things:

1) Go to the agent folder (where he installed) and run config.cmd with the flag remove. if you are in the agent folder run this in the command line:

./config remove

2) Go to the Deployment Group (in the UI) and click on the ... near the group and then Delete (to delete all the group, if you want only the agents so go inside and do the same thing there).

Shayki Abramczyk
  • 36,824
  • 16
  • 89
  • 114
  • 1
    You may also want to remove Deployment Pool as removing Deployment Group is not removing Deployment Pool explicitly. – Gucu112 Sep 13 '19 at 13:19
  • Great! Thanks!! Link to where in the documentation that this is explained? – Adam Cox May 16 '20 at 22:29
  • 2
    @AdamCox https://learn.microsoft.com/en-us/azure/devops/pipelines/agents/v2-windows?view=azure-devops#remove-and-re-configure-an-agent – Shayki Abramczyk May 17 '20 at 11:51
  • 1
    And in case it asks for PAT and you don't have it, refer this - [Is there any way to remove VSTS agent without PAT?](https://stackoverflow.com/a/46396872/1176573) – Rajesh Swarnkar Nov 02 '22 at 11:04
0

If you are in linux navigate to azagent folder and then

sudo ./svc.sh uninstall

Refer to : https://learn.microsoft.com/en-us/azure/devops/pipelines/agents/v2-linux?view=azure-devops

jmoerdyk
  • 5,544
  • 7
  • 38
  • 49
erhan355
  • 806
  • 11
  • 23