---
title: Uninstall the PHP agent
source: https://docs.newrelic.com/docs/apm/agents/php-agent/advanced-installation/uninstalling-php-agent
---

Read on to learn how to uninstall the New Relic PHP 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#php).

This document explains how to uninstall the [New Relic PHP agent](https://docs.newrelic.com/docs/agents/php-agent/getting-started/new-relic-php) for the following systems:

-   RedHat and CentOS
-   Ubuntu and Debian
-   Tar archive (any [supported system](https://docs.newrelic.com/docs/agents/php-agent/getting-started/php-agent-compatibility-requirements#operating-systems))

## Uninstalling the agent [#install-overview]

When uninstalling New Relic from a PHP application, you must remove the New Relic agent and also remove associated New Relic configuration files.

To uninstall the PHP agent from your system:

1.  Remove the agent files from your system:

    **RedHat or CentOS**

    Run the `newrelic-install` script with no options and select the uninstall option from the main menu when invoking the script.

    **Ubuntu or Debian**

    Use `apt-get` to remove the agent:

    ````bash
    apt-get remove newrelic-php5
    ```

    ````
2.  Remove any remaining New Relic configuration files. Use the `newrelic-install` or `apt-get remove` commands with the `purge` option.

    ```bash
    newrelic-install purge
    ```

    OR

    ```bash
    apt-get remove --purge newrelic
    ```
3.  If you use a package manager, remove files specific to the manager:

    **RedHat or CentOS**

    Using `yum`:

    ````bash
    sudo yum remove newrelic-php5
    ```

    Using <DNT>**`rpm` (32-bit)**</DNT>:

    ```bash
    rpm -e newrelic-php5-common-X.X.X.X (YOUR VERSION #)-1.noarch.rpm newrelic-daemon-X.X.X.X (YOUR VERSION NUMBER)-1.i386.rpm newrelic-php5-X.X.X.X-1.i386.rpm
    ```

    Using <DNT>**`rpm` (64-bit)**</DNT>:

    ```bash
    rpm -e newrelic-php5-common-X.X.X.X (VERSION NUMBER)-1.noarch.rpm newrelic-daemon-X.X.X.X (YOUR VERSION NUMBER)-1.x86_64.rpm newrelic-php5-X.X.X.X-1.x86_64.rpm
    ```

    ````

    **Ubuntu or Debian**

    Using `apt-get`:

    ````bash
    sudo apt-get purge newrelic-php5
    ```

    Using <DNT>**`dpkg` (32-bit)**</DNT>:

    ```bash
    dpkg -P newrelic-php5-common_X.X.X.X (YOUR VERSION NUMBER)_all.deb newrelic-daemon_X.X.X.X_i386.deb newrelic-php5_X.X.X.X_i386.deb
    ```

    Using <DNT>**`dpkg` (64-bit)**</DNT>:

    ```bash
    dpkg -P newrelic-php5-common_X.X.X.X (YOUR VERSION NUMBER)_all.deb newrelic-daemon_X.X.X.X_amd64.deb newrelic-php5_X.X.X.X_amd64.deb
    ```

    ````
4.  Restart your web servers (Apache, Nginx, PHP-FPM, etc.).
