-
-
Save grahampugh/ec6e27f02752c2162ca951db4a565a8e to your computer and use it in GitHub Desktop.
#!/bin/bash | |
## postinstall script to remove CCDA applications | |
# remove any existing version of the tool | |
echo "Moving the CC Cleaner app to Utilities in case users need it later" | |
rm -rf /Applications/Utilities/Adobe\ Creative\ Cloud\ Cleaner\ Tool.app ||: | |
mv /Applications/Adobe\ Creative\ Cloud\ Cleaner\ Tool.app /Applications/Utilities/Adobe\ Creative\ Cloud\ Cleaner\ Tool.app | |
# run the cleaner tool to remove EVERYTHING! | |
echo "Running the CC Cleaner app with 'removeAll=All' option" | |
/Applications/Utilities/Adobe\ Creative\ Cloud\ Cleaner\ Tool.app/Contents/MacOS/Adobe\ Creative\ Cloud\ Cleaner\ Tool --removeAll=All --eulaAccepted=1 | |
# remove Acrobat DC and Lightroom since the cleaner tool fails to do so | |
echo "Removing Acrobat DC if present" | |
[[ -d /Applications/Adobe\ Acrobat\ DC ]] && jamf policy -event "Adobe Acrobat DC-uninstall" ||: | |
echo "Removing Lightroom if present" | |
[[ -d /Applications/Adobe\ Lightroom\ CC ]] && rm -rf /Applications/Adobe\ Lightroom\ CC ||: | |
echo "Removing XD if present" | |
[[ -d /Applications/Adobe\ XD ]] && rm -rf /Applications/Adobe\ XD ||: | |
echo "Removing any Adobe 2020 apps if present" | |
find /Applications -name "Adobe*2020" -maxdepth 1 -exec rm -rf {} + | |
echo "Removing any Adobe 2020 apps if present - second pass" | |
find /Applications -name "Adobe*2020" -maxdepth 1 -exec rm -rf {} + | |
# delete the folders that remain | |
echo "Removing Adobe Application Manager if present" | |
[[ -d /Applications/Utilities/Adobe\ Application\ Manager ]] && rm -rf /Applications/Utilities/Adobe\ Application\ Manager ||: | |
echo "Removing Adobe Installers folder if present" | |
[[ -d /Applications/Utilities/Adobe\ Installers ]] && rm -rf /Applications/Utilities/Adobe\ Installers ||: | |
echo "Removing Adobe Application Support folder" | |
[[ -d /Library/Application\ Support/Adobe ]] && rm -rf /Library/Application\ Support/Adobe ||: | |
# also remove the current user's Adobe folder | |
# (warning! this could break Acrobat Reader DC and/or Flash Player - might need to uninstall those too) | |
current_user=$(/usr/sbin/scutil <<< "show State:/Users/ConsoleUser" | /usr/bin/awk -F': ' '/[[:space:]]+Name[[:space:]]:/ { if ( $2 != "loginwindow" ) { print $2 }}') | |
echo "Removing Adobe Application Support folder in $current_user home directory" | |
[[ -d /Users/$current_user/Library/Application\ Support/Adobe ]] && rm -rf /Users/$current_user/Library/Application\ Support/Adobe ||: | |
echo "Finished cleaning up Adobe CC applications" |
@grahampugh Forgive me for my noob question, but does this script delete ALL Adobe applications, or does it simply remove the leftover files of uninstalled Adobe apps? I am looking for something that does the latter.
@timfea926 Hi, this script will run the Adobe CC Cleaner Tool to remove all Adobe apps, but because the CC Cleaner Tool does such a bad job at cleaning everything up, this takes additional steps to remove the apps that the CC Cleaner Tool fails to remove. It's a basic bash script so you should be able to read it.
Thanks @grahampugh
I must admit I know absolutely nothing about scripting or how to read them, I usually just look for ones that are able to solve a particular problem I have and has good reviews/lots of downloads. For this instance, I was looking for a script that does exactly what yours does, but lets you specify the uninstalled program (in my case it would be Adobe Photoshop 20.2.4).
Works great, thanks!
Hi there,
I know that this is mac centric script, however, I was wondering if you are aware of an equivalent script for the Windows version?
Same question
Thanks for this! Works like a charm