def uninstall_dependencies(self, dependency_package_name="", op=None):
        """Uninstall all (optional) dependencies of this addon."""
        for dependency in self.get_dependencies():
            uninstall = False
            if dependency_package_name == "":
                uninstall = True
            elif dependency.package_name == dependency_package_name:
                uninstall = True
            if uninstall:
                dependency.uninstall(remove_sys_path=False, op=op)
        some_dependencies_installed = any(
            [
                dependency.installation_status
                for dependency in self.get_dependencies()
            ]
        )
        if not some_dependencies_installed:
            remove_command_line_sys_path()
Uninstall all (optional) dependencies of this addon.
photogrammetry_importer/preferences/dependency.py