---
title: Uninstall the Node.js agent
source: https://docs.newrelic.com/docs/apm/agents/nodejs-agent/installation-configuration/uninstall-nodejs-agent
---

Read on to learn how to uninstall the New Relic Node.js agent. For instructions on how to temporarily disable the agent, see [Disable the agent](https://docs.newrelic.com/docs/agents/manage-apm-agents/installation/disable-apm-agent#node).

To uninstall the New Relic Node.js agent:

1.  Remove `require('newrelic');` as the first line of the app's main module.
2.  Remove the npm package with `npm uninstall newrelic --save`.
3.  Delete the `newrelic.js` file and unset any [environment variables](https://docs.newrelic.com/docs/agents/nodejs-agent/installation-configuration/nodejs-agent-configuration#methods-and-precedence) being used.
4.  When the uninstall process finishes, [restart](#restart) your app.

For more information about installation, see [Installing and maintaining Node.js](https://docs.newrelic.com/docs/agents/nodejs-agent/installation-configuration/installing-maintaining-nodejs).

> #### 💡 TIP
>
> You may also want to [remove your app](https://docs.newrelic.com/docs/apm/new-relic-apm/maintenance/remove-applications-from-new-relic-ui) from New Relic.
