summaryrefslogtreecommitdiffstats
path: root/config/chroot_local-includes/usr/local/sbin/tails-additional-software-remove
blob: a97bf1ba75696a54978d27ac9e912d8a73b1eef4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
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)