diff --git a/bauh/gems/arch/controller.py b/bauh/gems/arch/controller.py index 96e7e91f..39d39f75 100644 --- a/bauh/gems/arch/controller.py +++ b/bauh/gems/arch/controller.py @@ -195,7 +195,17 @@ class ArchManager(SoftwareManager): return self.install(pkg=pkg, root_password=root_password, watcher=watcher, skip_optdeps=True) def _uninstall(self, pkg_name: str, root_password: str, handler: ProcessHandler) -> bool: - return handler.handle(SystemProcess(new_root_subprocess(['pacman', '-R', pkg_name, '--noconfirm'], root_password))) + res = handler.handle(SystemProcess(new_root_subprocess(['pacman', '-R', pkg_name, '--noconfirm'], root_password))) + + if res: + cached_paths = [ArchPackage.disk_cache_path(pkg_name, 'aur'), ArchPackage.disk_cache_path(pkg_name, 'mirror')] + + for path in cached_paths: + if os.path.exists(path): + shutil.rmtree(path) + break + + return res def uninstall(self, pkg: ArchPackage, root_password: str, watcher: ProcessWatcher) -> bool: handler = ProcessHandler(watcher) diff --git a/bauh/view/qt/window.py b/bauh/view/qt/window.py index ec6d4df9..9a437fa3 100755 --- a/bauh/view/qt/window.py +++ b/bauh/view/qt/window.py @@ -692,7 +692,7 @@ class ManageWindow(QWidget): return self._handle_console_option(True) - self.progress_controll_enabled = len(to_update) == 1 + self.progress_controll_enabled = len(to_update) == 1 self._begin_action(self.i18n['manage_window.status.upgrading']) self.thread_update.apps_to_update = to_update self.thread_update.root_password = pwd