The method you use to install the agent varies based on the installation mechanism you used. If you are not sure which method was used, see Checking the Installation Method.
Uninstall an RPM-Installed PHP Agent
If one is running, shut down the web server. This may not apply for a PHP CLI application.
Run the following command:
rpm -e appdynamics-php-agent-<version>
where <version> is the package you installed. You can find the version using:
rpm -qa | grep appdynamics-php-agent
Uninstall a Script-Installed PHP Agent
If you installed the agent using install.sh, uninstall that agent as follows:
Shut down the web server, if one is running. This may not apply for PHP CLI application.
From the PHP agent install directory, run the PHP installer with the -u option:
install.sh -u
Delete the <php_agent_install> directory.
Checking the Installation Method
If you used the Agent Download Wizard, it might not be obvious which installer was used since the installer is called by the runme.sh wizard script.
Normally, if RHEL and CentOS was selected in the wizard, the RPM installer was used. If All Other Linux OS was selected in the wizard, the shell script installer was used. So use the appropriate uninstall command based on the command that was used to install the agent.
If you do not know which selection was checked in the wizard, run:
rpm -qa | grep appdynamics-php-agent
If this does not list any results, assume that the shell script installer was used to install the agent.