remove app
This commit is contained in:
@@ -83,6 +83,13 @@ class DebInstaller:
|
||||
env=APT_NONINTERACTIVE_ENV,
|
||||
)
|
||||
|
||||
def cleanup_after_remove(self, purge: bool = False) -> None:
|
||||
autoremove_command = ["apt-get", *APT_DPKG_OPTIONS, "autoremove", "--yes"]
|
||||
if purge:
|
||||
autoremove_command.append("--purge")
|
||||
self.command_runner.run(autoremove_command, env=APT_NONINTERACTIVE_ENV)
|
||||
self.command_runner.run(["apt-get", "clean"], env=APT_NONINTERACTIVE_ENV)
|
||||
|
||||
def get_package_version(self, package_name: str) -> str | None:
|
||||
result = self.command_runner.run(["dpkg-query", "-W", "-f=${Version}", package_name])
|
||||
version = result.stdout.strip()
|
||||
|
||||
Reference in New Issue
Block a user