howdy/debian/prerm

29 lines
756 B
Python
Executable file

#!/usr/bin/env python3
# Executed on deinstallation
# Completely remove howdy from the system
# Import required modules
import subprocess
# Remove files and symlinks
try:
subprocess.call(["rm -rf /lib/security/howdy/"], shell=True)
except as e:
pass
try:
subprocess.call(["rm /usr/share/bash-completion/completions/howdy"], shell=True)
except as e:
pass
subprocess.call(["rm /usr/bin/howdy"], shell=True)
# Remove face_recognition and dlib
subprocess.call(["pip3 uninstall face_recognition dlib -y --no-cache-dir"], shell=True)
# Print a tearbending message
print("""
Howdy has been uninstalled :'(
There are still lines in /etc/pam.d/common-auth that can't be removed automatically
Run "nano /etc/pam.d/common-auth" to remove them by hand\
""")