-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathInstallManagerRemoveFlash.sh
More file actions
executable file
·42 lines (36 loc) · 1.82 KB
/
InstallManagerRemoveFlash.sh
File metadata and controls
executable file
·42 lines (36 loc) · 1.82 KB
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
39
40
41
42
#!/bin/bash
# Using the Flash Player Install Manager tool is the official method for removing flash.
# Thanks to the Neal on the MacAdmins # adobe Slack
# last edit 2020_01_27
# Try running the official removal tool first.
if [ -e "/Applications/Utilities/Adobe Flash Player Install Manager.app/Contents/MacOS/Adobe Flash Player Install Manager" ] ; then
/Applications/Utilities/Adobe\ Flash\ Player\ Install\ Manager.app/Contents/MacOS/Adobe\ Flash\ Player\ Install\ Manager -uninstall
fi
# Now in case Install Manager fails remove everything anyway and remove the directories the Install Manager does not clean up.
removeThis=("/Library/Application Support/Macromedia" \
"/Library/Application Support/Adobe/Flash Player Install Manager" \
"/Library/Internet Plug-Ins/Flash Player.plugin" \
"/Library/Internet Plug-Ins/flashplayer.xpt" \
"/Library/Internet Plug-Ins/PepperFlashPlayer" \
"/Library/LaunchDaemons/com.adobe.fpsaud.plist" \
"/Library/PreferencePanes/Flash Player.prefPane" \
"/Applications/Utilities/Adobe Flash Player Install Manager.app")
for removeThis in "${removeThis[@]}" ; do
if [ -e "$removeThis" ] ; then
echo "Removing $removeThis"
rm -rf "$removeThis"
fi
done
# Last check for these two directories in each user directory and remove them because the install manager doesn't.
for folder in /Users/*; do
user=$(basename "${folder}")
# compare folder name against the array items
if [ -e "/Users/${user}/Library/Preferences/Macromedia" ]; then
echo "Removing /Users/${user}/Library/Preferences/Macromedia"
rm -rf "/Users/${user}/Library/Preferences/Macromedia"
fi
if [ -e "/Users/${user}/Library/Caches/Adobe/Flash Player" ]; then
echo "Removing /Users/${user}/Library/Caches/Adobe/Flash Player"
rm -rf "/Users/${user}/Library/Caches/Adobe/Flash Player"
fi
done