Uninstall the Infrastructure agent or integrations

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 Amazon Web Services (AWS) Infrastructure Integrations. If you uninstall the agent, your integrations will remain. Similarly, if you disable or uninstall your integrations, the Infrastructure agent will remain.

Uninstall the Linux agent

To uninstall the Infrastructure agent for Linux environments, use your package management tools. 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

Uninstall the Windows agent

Requires Administrator rights in your Windows admin group.

To uninstall the Infrastructure agent for Windows environments:

  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.

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.

Disable or uninstall Infrastructure integrations

Cloud Integrations

AWS

You can disable Infrastructure AWS integrations and still retain the connection between your AWS account and New Relic Infrastructure. New Relic recommends that you do not disable your EC2 and EBS integrations because those add important metadata to your New Relic Infrastructure data.

If you want to... Do this
Disable one or more AWS service integrations

To disable services while keeping your AWS account linked to New Relic Infrastructure:

  1. From infrastructure.newrelic.com, select Integrations > Amazon Web Services > Manage services.
  2. From your Edit AWS account page, clear the checkbox for each active service you want to disable.
  3. Save your changes.

To disconnect your AWS account completely from New Relic Infrastructure, you need to unlink your AWS account. Note that this disables all New Relic integrations associated with that AWS account.

  1. Go to infrastructure.newrelic.com > Integrations > Amazon Web Services > Manage services.
  2. From your Edit AWS account page, select Unlink this account.
  3. Save your changes.
  4. Sign in to AWS and select Services > IAM > Roles.
  5. Select the checkbox for the role you want to delete, then select Role Actions > Delete Role.

Unlinking your AWS account will disable the trust relationship set up via your ARN.

Azure
If you want to... Do this
Disable one or more Azure service integrations

To disable services while keeping your Azure account linked to New Relic Infrastructure:

  1. From infrastructure.newrelic.com, select Integrations > Microsoft Azure > Manage services.
  2. From your Edit Azure account page, clear the checkbox for each active service you want to disable.
  3. Save your changes.

To disconnect your Azure account completely from New Relic Infrastructure, you need to unlink your Azure account. This requires being either the user who registered the app or an administrator. Note that this procedure will disable all New Relic integrations associated with that Azure account.

  1. Go to infrastructure.newrelic.com > Integrations > Microsoft Azure > Manage services.
  2. From your Edit Azure account page, select Unlink this account.
  3. Save your changes.
  4. Sign in to Azure and go into All Services > Identity > App registrations, or go to Azure Active Directory service and select App registrations.

  5. Find the registered app (the recommended name is NewRelic-Integrations). To see the full list of available apps, select the dropdown menu beside the search field and select All apps.
  6. Select the app and, on the panel that opens, select Delete.
GCP
If you want to... Do this
Disable one or more GCP service integrations

To disable services while keeping your GCP account linked to New Relic Infrastructure:

  1. From infrastructure.newrelic.com, select Integrations > Google Cloud Platform > Manage services.
  2. From your Edit GCP account page, clear the checkbox for each active service you want to disable.
  3. Save your changes.

To disconnect your GCP account completely from New Relic Infrastructure, you need to unlink your GCP account. Note that this disables all New Relic integrations associated with that GCP account.

If you registered the GCP project using a User account, follow these steps.

  1. Go to infrastructure.newrelic.com > Integrations > Google Cloud Platform > Manage services.
  2. From your Edit GCP account page, select Unlink this account.
  3. Save your changes.

If you registered the GCP project using a Service account, follow these steps. If you are deleting a custom role, be aware that that role may be used for other purposes besides New Relic access.

  1. Sign in to New Relic and go to Infrastructure > Integrations > Google Cloud Platform.
  2. For a standard (non-custom) user role, select Manage Services for the account you want to remove. Copy the value of User and save it.

    OR

    For a custom user role, go to IAM > admin > Roles, search for the role, select it, and select DELETE. You are now finished and can skip the remaining steps.

  3. Sign in to Google Cloud and make sure to select the correct project in the Select a project box at the top.
  4. On the navigation menu on the left, select IAM & admin > IAM.
  5. Search for the user value you saved. Select it and select REMOVE.

On-host integrations

If you used the integrations package to install all the on-host integrations, use the instructions below for All on-host integrations. If you installed integrations individually, you must uninstall them individually.

All on-host integrations
Package manager Uninstall instructions
apt (Debian or Ubuntu)
  1. sudo apt-get remove newrelic-infra-integrations
  2. sudo apt-get autoremove
yum (Amazon Linux, CentOS, or RHEL)
  1. sudo yum remove newrelic-infra-integrations
  2. sudo apt-get autoremove
Apache
Package manager Uninstall instructions
apt (Debian or Ubuntu) sudo apt-get remove nri-apache
yum (Amazon Linux, CentOS, or RHEL) sudo yum remove nri-apache
Cassandra
Package manager Uninstall instructions
apt (Debian or Ubuntu) sudo apt-get remove nri-cassandra
yum (Amazon Linux, CentOS, or RHEL) sudo yum remove nri-cassandra
Kubernetes

Each cluster will have a single node where kubectl is running. To uninstall the Kubernetes integration, use the following command on each of these nodes:

kubectl delete -f newrelic-infrastructure-k8s-latest.yaml
MySQL
Package manager Uninstall instructions
apt (Debian or Ubuntu) sudo apt-get remove nri-mysql
yum (Amazon Linux, CentOS, or RHEL) sudo yum remove nri-mysql
NGINX
Package manager Uninstall instructions
apt (Debian or Ubuntu) sudo apt-get remove nri-nginx
yum (Amazon Linux, CentOS, or RHEL) sudo yum remove nri-nginx
Redis
Package manager Uninstall instructions
apt (Debian or Ubuntu) sudo apt-get remove nri-redis
yum (Amazon Linux, CentOS, or RHEL) sudo yum remove nri-redis
StatsD
  1. cd /path/to/statsd
  2. npm uninstall @newrelic/statsd-infra-backend
  3. From the StatsD config.js, remove the "@newrelic/statsd-infra-backend" entry from the list of backends.
  4. Restart StatsD.

For more help

Recommendations for learning more: