---
title: Uninstall the .NET agent
source: https://docs.newrelic.com/docs/apm/agents/net-agent/installation/uninstall-net-agent
---

This document explains how to uninstall the New Relic .NET 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#net).

To uninstall the .NET agent, follow the procedure that corresponds to your operating system:

-   [Windows](#uninstall-framework-windows)
-   [Linux](#uninstall-linux)

## Uninstall the .NET agent (Windows) [#uninstall-framework-windows]

> #### 💡 TIP
>
> Requires [**Administrator** rights](https://docs.newrelic.com/docs/agents/net-agent/getting-started/compatibility-requirements-net-framework-agent#user-rights) in your Windows admin group.

This procedure assumes you installed the .NET agent with the MSI installer:

1.  To shut down any running agents, stop IIS. If you don't stop IIS, you may need to reboot after uninstalling the agent.
2.  Select **Start > All Programs > New Relic .NET Agent > Uninstall the .NET agent**.
3.  Follow the prompts to complete uninstallation.
4.  Restart IIS.

After uninstalling the agent, you may want to remove all agent-related files. Be sure to check other paths to remove any other New Relic files. For example, uninstalling the .NET agent does not delete your [`newrelic.config`](https://docs.newrelic.com/docs/agents/net-agent/installation-configuration/net-agent-configuration#config-options-precedence) file.

1.  From **Control Panel > Programs > Programs and Features**, right-click and delete any files named `New Relic .NET Agent`.
2.  Delete the entire folder at `C:\ProgramData\New Relic\.NET Agent`.
3.  Delete the entire folder at `C:\Program Files\New Relic\.NET Agent`.
4.  Delete the entire folder at `C:\Program Files (x86)\New Relic\.NET Agent`.
5.  [Remove your app](https://docs.newrelic.com/docs/apm/new-relic-apm/maintenance/remove-applications-from-new-relic-ui) from the APM UI.

## Uninstall the .NET agent (Linux) [#uninstall-linux]

To uninstall the .NET agent on Linux, use your package management tool.

> #### ⚠️ IMPORTANT
>
> For .NET agent versions 10.0.0 or higher, the name of the package is `newrelic-dotnet-agent`. For .NET agent versions 9.9.0 or lower, the name of the package is `newrelic-netcore20-agent`.
> The rest of this document will refer to `newrelic-dotnet-agent`; replace this with the older name if you have an older agent version installed.

> #### ⚠️ IMPORTANT
>
> You must restart your application once the uninstall is finished.

**Uninstall with apt (Debian, Ubuntu, and Linux Mint)**

Execute the following command as root (or using `sudo`):

````sh
apt-get remove newrelic-dotnet-agent
```

````

**Uninstall with dpkg (Debian, Ubuntu, and Linux Mint)**

Execute the following command as root (or using `sudo`):

````sh
dpkg --remove newrelic-dotnet-agent
```

````

**Uninstall with yum (CentOS, Red Hat Enterprise Linux, Oracle Linux)**

Execute the following command as root (or using `sudo`):

````sh
yum remove newrelic-dotnet-agent
```

````

**Uninstall with rpm (CentOS, Red Hat Enterprise Linux, Oracle Linux)**

Execute the following command as root (or using `sudo`):

````sh
sudo rpm -e newrelic-dotnet-agent
```

````

**Uninstall tarball**

1.  Delete all New Relic files from your app folder.
2.  Unset New Relic environment variables:

    ```ini
    CORECLR_ENABLE_PROFILING=1
    CORECLR_PROFILER={36032161-FFC0-4B61-B559-F6C5D41BAE5A}
    CORECLR_NEWRELIC_HOME=PATH_TO_INSTALL
    CORECLR_PROFILER_PATH=%CORECLR_NEWRELIC_HOME%\NewRelic.Profiler.dll
    ```
