-
Notifications
You must be signed in to change notification settings - Fork 205
/
uninstall
executable file
·32 lines (24 loc) · 1.16 KB
/
uninstall
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#!/bin/bash
function error {
echo -e "\e[91m$1\e[39m"
exit 1
}
DIRECTORY="$(readlink -f "$(dirname "$0")")"
#click new uninstallation analytics link
"${DIRECTORY}/api" shlink_link script uninstall
if [ -z "$(dpkg-query -W --showformat='${Status}\n' yad 2>/dev/null | grep "install ok installed")" ];then
zenity --title='Pi-Apps' --window-icon="${DIRECTORY}/icons/logo.png" \
--list --text="Do you want to uninstall YAD?" \
--ok-label=Yes --cancel-label=No \
--column=foo --hide-header 2>/dev/null && "${DIRECTORY}/etc/terminal-run" "sudo apt purge -y yad;echo -e '\nClosing in 5 seconds.';sleep 5" "Uninstalling YAD"
fi
echo "Removing menu button..."
rm -f ~/.local/share/applications/pi-apps.desktop
rm -f ~/.local/share/applications/pi-apps-settings.desktop
rm -f ~/.config/autostart/pi-apps-updater.desktop
rm -f ~/Desktop/pi-apps.desktop
echo "Removing terminal command..."
sudo rm -f /usr/local/bin/pi-apps
echo -e "\e[32mUninstallation complete.\e[97m Only $HOME/pi-apps still remains.
If Pi-apps didn"\'"t work for you, \e[4m\e[21m\e[5mPLEASE\e[0m\e[97m consider submitting a \e[1mbug report\e[0m!
--> \e[96mhttps://github.com/Botspot/pi-apps/issues/new\e[39m"