summaryrefslogtreecommitdiffstats
path: root/config/chroot_local-includes/usr/local/sbin/tails-additional-software-remove
diff options
context:
space:
mode:
Diffstat (limited to 'config/chroot_local-includes/usr/local/sbin/tails-additional-software-remove')
-rwxr-xr-xconfig/chroot_local-includes/usr/local/sbin/tails-additional-software-remove18
1 files changed, 18 insertions, 0 deletions
diff --git a/config/chroot_local-includes/usr/local/sbin/tails-additional-software-remove b/config/chroot_local-includes/usr/local/sbin/tails-additional-software-remove
new file mode 100755
index 0000000..a97bf1b
--- /dev/null
+++ b/config/chroot_local-includes/usr/local/sbin/tails-additional-software-remove
@@ -0,0 +1,18 @@
+#!/usr/bin/python3
+
+import sys
+
+from tailslib.additionalsoftware.config import (
+ remove_additional_packages,
+ get_additional_packages)
+
+if len(sys.argv) != 2:
+ sys.exit(2)
+
+old_package = str(sys.argv[1])
+
+additional_packages = get_additional_packages(search_new_persistence=True)
+if old_package in additional_packages:
+ remove_additional_packages({old_package}, search_new_persistence=True)
+else:
+ sys.exit(1)