diff --git a/slpkg/views/views.py b/slpkg/views/views.py index 1faf5c0a..99789479 100644 --- a/slpkg/views/views.py +++ b/slpkg/views/views.py @@ -4,6 +4,7 @@ import os import shutil from typing import Any +from pathlib import Path from distutils.version import LooseVersion from slpkg.configs import Configs @@ -180,7 +181,10 @@ class ViewMessage: def _view_removed(self, name: str): """ View and creates list with packages for remove. """ - installed = os.listdir(self.configs.log_packages) + pattern = f'*{self.configs.sbo_repo_tag}' + + var_log_packages = Path(self.configs.log_packages) + installed = [file.name for file in var_log_packages.glob(pattern)] if self.utils.is_installed(name): for package in installed: