Your hosts are added automatically when you install the infrastructure agent for your Linux or Windows operating system, or update the agent. Similarly, your hosts disappear automatically when you uninstall the agent. You do not need to manually add or remove your hosts.
Since there are are no automated scripts in the uninstall process, old files may remain when you uninstall. Be sure to manually remove outdated files.
Uninstall the Linux infrastructure agent
If you used the default install procedure for your infrastructure agent for Linux environments, use your package management tools to uninstall it. You do not need to stop the service before running the uninstall command.
You must also uninstall any cloud monitoring integration such as our Azure or Google Cloud Platform integrations. Otherwise, you'll continue to see the host in your UI with no data.
Uninstall the Windows infrastructure agent
If you used the default install procedure for the infrastructure agent for Windows environments, to uninstall:
- Ensure you have Administrator rights in your Windows admin group.
- Stop the infrastructure agent.
- From the Windows Control Panel, use the Add/Remove Programs and Features tool to uninstall the infrastructure agent.
- From the Windows Program Files, manually delete the New Relic folder to delete all files associated with the infrastructure agent for Windows.
Uninstall the macOS infrastructure agent
If you used the default install procedure for the infrastructure agent for macOS environments, to uninstall:
- brew services stop newrelic-infra-agent
From the terminal, run the uninstall command:brew uninstall newrelic-infra-agent
Uninstall using config management tools
To uninstall the infrastructure agent if you used a configuration management tool:
Config management tools
Uninstall New Relic infrastructure agent
Optional: Purge remaining files
If you use standard package management tools for your selected platform, the uninstall process typically leaves configuration and other miscellaneous files. If you need to completely purge any of the remaining files after uninstalling the New Relic infrastructure agent, follow standard procedures for your operating system.