Uninstall the Python Agent
- Go to the virtual environment if you are using one.
- Uninstall the APM Insight package using the following command:
pip uninstall apminsight
- For Django applications, remove apminsight.contrib.django and the configuration variables you have added to the application's settings.py file.
- For other applications, remove the code snippet from the main file of your application.
"initialize_agent({
"appname" : xxxxxxxxxx,
"app_port" : xxxxxxxxxx
xxxxxxxxxx
xxxxxxxxxx" - Restart your application.
When you uninstall the agent:
- The dependency packages (requests and urllib3) associated with the agent will not be removed. You need to manually uninstall them if they are no longer required.
- The agent-related environment variables and logs will not be deleted automatically. You need to delete the apminsightdata log folder present in your application directory and unset any exported environment variables that were set up during the agent's installation.