argument('name'); $confirmQuestion = 'Please confirm that you wish to completely rollback this extension. This may result in potential data loss.'; if ($this->confirm($confirmQuestion)) { try { Admin::extension() ->updateManager() ->setOutPut($this->output) ->uninstall($name); } catch (\Throwable $exception) { $lastVersion = Admin::extension()->versionManager()->getCurrentVersion($name); $this->output->writeln(sprintf('An exception occurred during the rollback and the process has been stopped. The extension was rolled back to version v%s.', $lastVersion)); throw $exception; } } } }