How to install and uninstall Blender add-on via python API

Blender add-ons installation and uninstallation can be managed through the python API. Use the following commands in a script:

To deactivate the add-on:

To uninstall the add-on:

To install the add-on:

If the “overwrite” parameter is True, the add-on will be reinstalled, even if it has not been previously removed.

To activate the add-on: