How Do I Remove a Server?
  • 1 Minute to read
  • Dark
    Light
  • PDF

How Do I Remove a Server?

  • Dark
    Light
  • PDF

Article summary

Servers that are offline for more than a certain amount of time will be automatically deleted unless you disable that setting in Server Settings.

There may be times when you want to remove a server manually. Here are the steps:

Click on the Settings Icon for the server and click remove

RemoveServer

Confirm the Removal

Confirmation

Once the button is clicked a remote command is sent to the agent to uninstall. In order to re-add the server after this process, you will need to reinstall the agent again.

How to Remove Servers Programmatically

This section is intended to help you leverage Stackify's API by making a REST service call to programmatically remove Retrace instances from the Servers page of Retrace.

Below are the REST calls to the API for both Windows and Linux machines that can be added to shutdown scripts of your server.

Remove a Windows Server with PowerShell

Plug in your API key found in the Settings page of your account and run the call as a PowerShell script:

Invoke-RestMethod -Method POST -Header @{ "X-Stackify-Key" = "license_key_here" } -uri https://api.stackify.com/API/Device/RemoveServerByName/?name=$env:computername 

Note: The $env:computername variable makes an assumption of what your computer name is. There may be cases where you may need to manually set the computer name: /?name=your_server_name

Remove a Linux Server with cURL

curl -X POST -i -H "X-Stackify-Key: license_key_here" -H "Content-Length: 0" https://api.stackify.com/API/Device/RemoveServerByName/?name=hostname

Using hostname makes an assumption of what your computer name is. There may be cases where you may need to manually set the computer name: /?name=your_server_name

After making the REST call, you should see your instances removed from the Servers page in your Retrace account almost immediately.


Was this article helpful?