Help APM APM for Python Uninstall Python Agent

Uninstall the Python Agent

  1. Go to the virtual environment if you are using one.
  2. Uninstall the APM Insight package using the following command:
    pip uninstall apminsight
  3. For Django applications, remove apminsight.contrib.django and the configuration variables you have added to the application's settings.py file.
  4. For other applications, remove the code snippet from the main file of your application.

    "initialize_agent({

                    "appname" : xxxxxxxxxx,

                    "app_port" :  xxxxxxxxxx

         xxxxxxxxxx

         xxxxxxxxxx"
  5. Restart your application.
When you uninstall the agent:
  1. 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.
  2. 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.
Was this document helpful?
Thanks for taking the time to share your feedback. We’ll use your feedback to improve our online help resources.

Help APM APM for Python Uninstall Python Agent