Uninstalling the host agent on Linux
You can uninstall the Instana agent from Linux systems by using different methods, depending on the operating system distribution.
Before you begin
Before uninstalling the Instana agent, you need to uninstall the tracers (or in-process collectors) that are installed in your application runtimes.
If your host contains PHP runtimes and PHP tracing is enabled (by default) in the agent configuration.yaml file, you need to uninstall PHP Tracer by following the steps that are described in Disabling PHP tracing.
After uninstalling the tracers, you can proceed to uninstall the Instana agent using the following methods:
Uninstalling on Debian derivatives
To uninstall the host agent on Debian-based derivatives, complete the following steps:
-
Get the name of the package that is installed on your system by running the following command:
apt list --installed | grep instana-agentThe output holds the exact package name to use for the uninstall command. In the following example, the package name is
instana-agent-static-j9/generic:instana-agent-static-j9/generic,now 20221024-1455 amd64 [installed] -
Uninstall the agent by running the following command:
sudo apt-get purge <package_name>Replace <package_name> with the package name that you get in step 1.
Uninstalling on Red Hat derivatives
To uninstall the host agent on Red Hat derivatives, complete the following steps:
-
Get the name of the package that is installed on your system by running the following command:
yum list installed | grep instana-agentThe output holds the exact package name to use for the uninstallation command. In the following example, the package name is
instana-agent-static-j9.x86_64:instana-agent-static-j9.x86_64 20221024-1455 @instana-agent -
Uninstall the agent by running the following command:
sudo yum remove <package_name>Replace <package_name> with the package name that you get in step 1.
rm -rf /opt/instana/agent command.