Uninstall the Infrastructure agent

Your hosts will appear automatically in the New Relic Infrastructure UI when you install the Infrastructure agent for your Linux or Windows operating system, or update the agent. Similarly, your hosts will disappear automatically in the Infrastructure UI when you uninstall the agent. You do not need to manually add or remove your hosts.

Uninstalling the agent does not directly affect any of your Infrastructure Integrations. To uninstall an integration, follow the corresponding procedure.

Uninstall the Linux 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.

Uninstall with apt (Debian or Ubuntu)

Execute the following command as root:

sudo apt-get remove newrelic-infra
Uninstall with yum (Amazon Linux, CentOS, or RHEL)

Execute the following command as root:

sudo yum remove newrelic-infra
Uninstall with Zypper (SLES)

Execute the following command as root:

sudo zypper -n remove newrelic-infra

If you followed an assisted or manual installation process, you need to manually delete all the files created when you unpacked the agent file.

Since there are are no automated scripts, old files may remain when you uninstall. Be sure to manually remove outdated files.

Uninstall the Windows agent

Requires Administrator rights in your Windows admin group.

If you used the default install procedure for the Infrastructure agent for Windows environments, to uninstall:

  1. Stop the Infrastructure agent.
  2. From the Windows Control Panel, use the Add/Remove Programs and Features tool to uninstall the New Relic Infrastructure agent.
  3. From the Windows Program Files, manually delete the New Relic folder to delete all files associated with the Infrastructure agent for Windows.

If you followed an assisted or manual installation process, you need to manually delete all the files created when you unpacked the agent file.

Since there are are no automated scripts, old files may remain when you uninstall. Be sure to manually remove outdated files.

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
Ansible

Set the 'agent_state' parameter to 'absent'.

Chef

Set the 'agent_action' node to uninstall.

Puppet

Set the 'ensure' parameter to 'absent'.

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.

For more help

Recommendations for learning more: