in files/sdw-admin.py [0:0]
def perform_uninstall():
try:
subprocess.check_call(
["sudo", "qubesctl", "state.sls", "securedrop_salt.sd-clean-default-dispvm"]
)
print("Destroying all VMs")
subprocess.check_call([os.path.join(SCRIPTS_PATH, "scripts/destroy-vm"), "--all"])
print("Reverting dom0 configuration")
subprocess.check_call(["sudo", "qubesctl", "state.sls", "securedrop_salt.sd-clean-all"])
subprocess.check_call([os.path.join(SCRIPTS_PATH, "scripts/clean-salt")])
print("Uninstalling dom0 config package")
subprocess.check_call(
["sudo", "dnf", "-y", "-q", "remove", "securedrop-workstation-dom0-config"]
)
except subprocess.CalledProcessError:
raise SDWAdminException("Error during uninstall")
print(
"Instance secrets (Journalist Interface token and Submission private key) are still "
"present on disk. You can delete them in /usr/share/securedrop-workstation-dom0-config"
)