Adobe Flash is dead – let’s get it removed
After 24 years and 1078 known security vulnerabilities, Adobe Flash has reached end of life status as of December 31, 2020.
To assist with the process of removing Adobe Flash, I’ve written an uninstall script which will completely remove Adobe Flash. For more details, please see below the jump.
This script is designed to uninstall the Adobe Flash plug-ins and their associated components. As part of this, it runs the following actions:
- Stop Adobe Flash Install Manager
- If running, unload the launchdaemon used by the Adobe Flash update process.
- Remove the Adobe Flash plug-ins, Adobe Flash Install Manager and their associated components.
- Remove Adobe Flash preference pane settings at the user level.
- Forget the installer package receipts.
The script is available below and at the following address on GitHub:
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# This script uninstalls Adobe Flash software | |
AdobeFlashUninstall (){ | |
echo "Uninstalling Adobe Flash software…" | |
# kill the Adobe Flash Player Install Manager | |
echo "Stopping Adobe Flash Install Manager." | |
killall "Adobe Flash Player Install Manager" | |
if [[ -f "/Library/LaunchDaemons/com.adobe.fpsaud.plist" ]]; then | |
echo "Stopping Adobe Flash update process." | |
/bin/launchctl bootout system "/Library/LaunchDaemons/com.adobe.fpsaud.plist" | |
fi | |
if [[ -f "/Library/Application Support/Macromedia/mms.cfg" ]]; then | |
echo "Deleting Adobe Flash update preferences." | |
rm "/Library/Application Support/Macromedia/mms.cfg" | |
fi | |
if [[ -e "/Library/Application Support/Adobe/Flash Player Install Manager/fpsaud" ]]; then | |
echo "Deleting Adobe software update app and support files." | |
rm "/Library/LaunchDaemons/com.adobe.fpsaud.plist" | |
rm "/Library/Application Support/Adobe/Flash Player Install Manager/FPSAUConfig.xml" | |
rm "/Library/Application Support/Adobe/Flash Player Install Manager/fpsaud" | |
fi | |
if [[ -e "/Library/Internet Plug-Ins/Flash Player.plugin" ]]; then | |
echo "Deleting NPAPI browser plug-in files." | |
rm -Rf "/Library/Internet Plug-Ins/Flash Player.plugin" | |
rm -Rf "/Library/Internet Plug-Ins/Flash Player Enabler.plugin" | |
rm "/Library/Internet Plug-Ins/flashplayer.xpt" | |
fi | |
if [[ -e "/Library/Internet Plug-Ins/PepperFlashPlayer/PepperFlashPlayer.plugin" ]]; then | |
echo "Deleting PPAPI browser plug-in files." | |
rm -Rf "/Library/Internet Plug-Ins/PepperFlashPlayer/PepperFlashPlayer.plugin" | |
rm "/Library/Internet Plug-Ins/PepperFlashPlayer/manifest.json" | |
fi | |
if [[ -e "/Library/PreferencePanes/Flash Player.prefPane" ]]; then | |
echo "Deleting Flash Player preference pane from System Preferences." | |
rm -Rf "/Library/PreferencePanes/Flash Player.prefPane" | |
fi | |
# Removing Adobe Flash preference pane settings at user level | |
allLocalUsers=$(/usr/bin/dscl . -list /Users UniqueID | awk '$2>500 {print $1}') | |
for userName in ${allLocalUsers}; do | |
# get path to user's home directory | |
userHome=$(/usr/bin/dscl . -read "/Users/$userName" NFSHomeDirectory 2>/dev/null | /usr/bin/sed 's/^[^\/]*//g') | |
/usr/bin/defaults delete "${userHome}/Library/Preferences/com.apple.systempreferences.plist" com.adobe.preferences.flashplayer 2>/dev/null | |
done | |
#Remove receipts | |
rm -Rf /Library/Receipts/*FlashPlayer* | |
pkgutil –forget com.adobe.pkg.FlashPlayer >/dev/null 2>&1 | |
pkgutil –forget com.adobe.pkg.PepperFlashPlayer >/dev/null 2>&1 | |
# Remove Adobe Flash Player Install Manager.app | |
if [[ -e "/Applications/Utilities/Adobe Flash Player Install Manager.app" ]]; then | |
echo "Deleting the Adobe Flash Player Install Manager app." | |
rm -Rf "/Applications/Utilities/Adobe Flash Player Install Manager.app" | |
fi | |
echo "Uninstall completed successfully." | |
} | |
# Set exit error code | |
ERROR=0 | |
# Check to see if Adobe Flash sofware is installed by locating either the Flash NPAPI or PPAPI browser | |
# plug-ins in /Library/Internet Plug-Ins or the Adobe Flash Player Install Manager.app in /Applications/Utilities | |
if [[ -e "/Library/Internet Plug-Ins/Flash Player.plugin" ]] || [[ -e "/Library/Internet Plug-Ins/PepperFlashPlayer/PepperFlashPlayer.plugin" ]] || [[ -e "/Applications/Utilities/Adobe Flash Player Install Manager.app" ]]; then | |
# Run the Adobe Flash Player software uninstaller | |
AdobeFlashUninstall | |
if [[ $? -eq 0 ]]; then | |
echo "Adobe Flash Player uninstalled successfully." | |
else | |
echo "Error: Failed to uninstall Adobe Flash Player software." | |
ERROR=1 | |
fi | |
else | |
echo "Error: Adobe Flash Player software is not installed." | |
ERROR=1 | |
fi | |
exit $ERROR |
I haven’t used this myself (I also had a removal script prior to hearing about it) but there’s also the option to use Adobe’s uninstall methodology:
“/Applications/Utilities/Adobe Flash Player Install Manager.app/Contents/MacOS/Adobe Flash Player Install Manager” -uninstall
Taken from this post:
https://www.jamf.com/jamf-nation/discussions/35141/good-riddance-flash#responseChild200891
Also “…Adobe will block Flash content from running in Flash Player beginning January 12, 2021…” (by refusing to run, but _not_ by uninstalling itself) per:
https://www.adobe.com/products/flashplayer/end-of-life.html
Heroic methods to force Flash Player to run after January 12, 2021 are detailed in the “Enterprise Enablement” section in the Flash Player Administration Guide (but nobody really should be doing that):
Click to access flash_player_32_0_admin_guide.pdf
I’m getting “unable to execute ./adobe_flash_uninstall.sh: Operation not permitted” and ls yields: -rwxr–r–@ 1 deh staff 2970 Jan 2 10:10 adobe_flash_uninstall.sh*
You should make the script executable by setting the executable bit chmod +x /adobe_flash_uninstall.sh then ls -al should yield rwxr-xr-x
chmod +X adobe_flash_uninstall.sh
I missed something in my copying. already did chmod +x. The operation not permitted still comes thru.
Did you run the script as root (sudo ./adobe_flash_uninstall.sh)?
Worked fine here.
It should be pkgutil –forget (with two dashes). The script on GitHub seems fine but as presented here in this post it looks like it only has one dash. ¯\_(ツ)_/¯
Is there any reason you would not want to delete the entire “/Library/Application Support/Adobe/Flash Player Install Manager” directory instead of just those two items specified within?
Thank you for this working without problems as always 😉