Skip to content

Instantly share code, notes, and snippets.

@grahampugh
Created November 18, 2019 15:06
Show Gist options
  • Save grahampugh/ec6e27f02752c2162ca951db4a565a8e to your computer and use it in GitHub Desktop.
Save grahampugh/ec6e27f02752c2162ca951db4a565a8e to your computer and use it in GitHub Desktop.
A script to clean up properly the things that Adobe CC Cleaner fails to remove.
#!/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"
@mrnemesisman
Copy link

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?

@rudolphos
Copy link

Same question

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment