summaryrefslogtreecommitdiff
path: root/cli/uninstall.sh
blob: 25d1d5860d9fd0a73ead52d0bb32e28466187b4e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#!/bin/sh

[ "$UID" -eq 0 ] || exec sudo "$0" "$@"

echo "Uninstalling Steam Deck Plugin Loader..."

USER_DIR="$(getent passwd $SUDO_USER | cut -d: -f6)"
HOMEBREW_FOLDER="${USER_DIR}/homebrew"

# Disable and remove services
sudo systemctl disable --now plugin_loader.service > /dev/null
sudo rm -f "${USER_DIR}/.config/systemd/user/plugin_loader.service"
sudo rm -f "/etc/systemd/system/plugin_loader.service"

# Remove temporary folder if it exists from the install process
rm -rf "/tmp/plugin_loader"

# Cleanup services folder
sudo rm "${HOMEBREW_FOLDER}/services/PluginLoader"

# disable CEF debugging
sudo rm "${USER_DIR}/.steam/steam/.cef-enable-remote-debugging"
sudo rm "${USER_DIR}/.var/app/com.valvesoftware.Steam/data/Steam/.cef-enable-remote-debugging" 2> /dev/null