#!/bin/bash # x3-ssh uninstaller # Run as root (sudo) to remove system-wide installation set -e BIN="/usr/local/bin/x3-ssh" DESKTOP="/usr/share/applications/x3-ssh.desktop" ICON_HIERARCHY="/usr/share/icons/hicolor/256x256/apps/x3-ssh.png" ICON_SCALABLE="/usr/share/icons/hicolor/scalable/apps/x3-ssh.svg" ICON_LEGACY="/usr/local/share/icons/x3-ssh.png" echo "x3-ssh uninstaller" echo "==================" echo "" if [ "$EUID" -ne 0 ]; then echo "Error: Run this script as root (sudo ./uninstall.sh)" exit 1 fi removed=0 remove_file() { if [ -f "$1" ]; then rm -f "$1" echo " Removed: $1" removed=$((removed + 1)) fi } echo "Removing binary..." remove_file "$BIN" echo "Removing desktop file..." remove_file "$DESKTOP" echo "Removing icons..." remove_file "$ICON_HIERARCHY" remove_file "$ICON_SCALABLE" remove_file "$ICON_LEGACY" echo "" if [ $removed -gt 0 ]; then echo "Done. $removed file(s) removed." else echo "Nothing to remove - x3-ssh is not installed." fi echo "" echo "Note: User config was NOT removed." echo " Config dir: ~/.config/sshclient/" echo " To remove config: rm -rf ~/.config/sshclient/"