Uninstalling the agent

If you encounter problems using New Relic, you can always get support at support.newrelic.com. If you need to uninstall New Relic completely, follow the procedures for your specific agent or server monitor.

Verifying no data is reported

Before uninstalling any agent, make sure no data is being reported to New Relic from your app (or server):

  • Applications: From the New Relic menu bar, select APM > Applications, and verify that the color-coded "health" status is gray for each app listed on the Applications index.
  • Servers: From the New Relic menu bar, select Servers > Servers, and verify that the color-coded "health" status is gray for each server or component listed on the Servers index.

Uninstalling agents for apps

Procedures to uninstall specific agents vary slightly.

Java

To remove the Java agent after verifying no data is being reported to New Relic:

  1. Delete the newrelic folder from your app server's root.
  2. Delete the New Relic Java options variable from your startup script.
  3. When the uninstall process finishes, restart your app.

For more information about installation, see New Relic for Java.

.NET

To remove the .NET agent after verifying no data is being reported to New Relic:

  1. Select Start > All Programs > New Relic .NET Agent.
  2. Select Uninstall the .NET agent.
  3. Follow the prompts to complete the uninstallation.
  4. When the uninstall process finishes, restart your app.

This process will leave your newrelic.config file untouched.

For more information about installation, see New Relic for .NET.

Node.js

To uninstall New Relic's Node.js agent completely after verifying no data is being reported to New Relic:

  1. Remove require('newrelic'); as the first line of the app's main module.
  2. When the uninstall process finishes, restart your app.

For more information about installation, see Installating and maintaining Node.js.

PHP

To remove the PHP agent and leave the configuration file intact (in case you want to reinstall the agent):

  1. Verify no data is being reported to New Relic.
  2. Execute the newrelic-install script (as root):

    sudo /usr/bin/newrelic-install
  3. When the uninstall process finishes, restart your app.

To fully remove the agent, include the purge option in the script. This will remove everything from your system:

  1. Verify no data is being reported to New Relic.
  2. Execute the newrelic-install script (as root):

    sudo /usr/bin/newrelic-install purge
  3. When the uninstall process finishes, restart your app.

For more information, see The newrelic-install script and New Relic for PHP.

Python

To uninstall your Python agent:

  1. Verify no data is being reported to New Relic.
  2. Use one of these methods:
    • If installed with PIP: pip uninstall newrelic/.
    • If installed with easy_install: easy_install -m newrelic.
  3. When the uninstall process finishes, restart your app.

For more information about installation, see New Relic for Python.

Ruby

To remove the Ruby agent from your Rails application:

  1. Verify no data is being reported to New Relic.
  2. Remove the newrelic.yml file from your RAILS_ROOT/config/ folder.
  3. When the uninstall process finishes, restart your app.

To remove New Relic from your Gemfile:

  1. Verify no data is being reported to New Relic.
  2. Delete the line gem 'newrelic_rpm' from your Gemfile.
  3. Run bundle install.
  4. When the uninstall process finishes, restart your app.

For more information about installation, see New Relic for Ruby.

Uninstalling server monitoring agents

To uninstall New Relic Servers:

  1. Verify no data is being reported to New Relic.
  2. Follow the instructions for your platform:

  3. When the uninstall process finishes, restart your server.

Restarting the app or server

New Relic agents typically run in memory within the process running the app. Removing the New Relic files from the directory where they were installed generally will not stop the applications currently running from reporting metrics to New Relic. This is why you must restart your app (or the application server or web server within which it lives) after removing the New Relic files and any changes made to your application startup scripts.

For more help

If you need additional help, get support at support.newrelic.com.