get(common_ext_ExtensionsManager::SERVICE_ID); $extension = $extensionManager->getExtensionById($extId); $uninstaller = new tao_install_ExtensionUninstaller($extension); $uninstaller->uninstall(); $serviceManager->getContainerBuilder() ->forceBuild(); $message = __('Uninstalled %s', $extId); } catch (common_Exception $e) { $message = __('Uninstall of %s failed', $extId) . ': ' . $e->getMessage(); } echo PHP_EOL . $message . PHP_EOL;