-
-
Notifications
You must be signed in to change notification settings - Fork 17
/
Copy pathlinux_uninstall.sh
38 lines (30 loc) · 969 Bytes
/
linux_uninstall.sh
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
32
33
34
35
36
37
38
#!/bin/bash
PKG_NAME="bgremover"
# Directory where the executable file was installed
INSTALL_DIR="/usr/local/bin"
# Directory where the icon file was saved
ICON_DIR="/usr/share/icons/hicolor/128x128/apps"
# Path to the desktop entry file
DESKTOP_FILE="/usr/share/applications/$PKG_NAME.desktop"
# Remove the executable file
if [ -f "$INSTALL_DIR/$PKG_NAME" ]; then
sudo rm "$INSTALL_DIR/$PKG_NAME"
echo "Removed executable: $INSTALL_DIR/$PKG_NAME"
else
echo "Executable not found: $INSTALL_DIR/$PKG_NAME"
fi
# Remove the icon file
if [ -f "$ICON_DIR/$PKG_NAME.png" ]; then
sudo rm "$ICON_DIR/$PKG_NAME.png"
echo "Removed icon: $ICON_DIR/$PKG_NAME.png"
else
echo "Icon not found: $ICON_DIR/$PKG_NAME.png"
fi
# Remove the desktop entry file
if [ -f "$DESKTOP_FILE" ]; then
sudo rm "$DESKTOP_FILE"
echo "Removed desktop entry: $DESKTOP_FILE"
else
echo "Desktop entry not found: $DESKTOP_FILE"
fi
echo "Uninstallation complete."