diff --git a/plinth/package.py b/plinth/package.py index 14efcecf2..ab2edcc9b 100644 --- a/plinth/package.py +++ b/plinth/package.py @@ -308,9 +308,9 @@ class Packages(app_module.FollowerComponent): """ packages_set: set[str] = set(packages) - # Get list of packages needed by other installed apps (packages to - # keep). - keep_packages: set[str] = set() + # Get list of packages needed by other installed apps and by freedombox + # itself (packages to keep). + keep_packages: set[str] = {'freedombox'} for app in app_module.App.list(): # uninstall() will be called on Packages of this app separately # for uninstalling this app. diff --git a/plinth/tests/test_package.py b/plinth/tests/test_package.py index c5153479d..40baad205 100644 --- a/plinth/tests/test_package.py +++ b/plinth/tests/test_package.py @@ -178,11 +178,11 @@ def test_packages_uninstall(uninstall, _refresh_package_lists): """Test app""" app_id = 'test-app' - component = Packages('test-component', ['python3', 'bash']) + component = Packages('test-component', ['bash', 'dash']) app = TestApp() app.add(component) app.uninstall() - uninstall.assert_has_calls([call(['python3', 'bash'], purge=True)]) + uninstall.assert_has_calls([call(['bash', 'dash'], purge=True)]) @patch('plinth.package.refresh_package_lists')