Therefore, there was a need to uninstall the apps.
I could have run the license removal tool to remove office on this test device, but because I wanted to demonstrate how to i nstall Office afresh. Here is a guide on this topic “ Remove office License on Mac: How do you change the account that Office says it belongs to“, and this led to the removal of these office apps. You can now remove icons from Dock (if any!).I recently had to remove Office from my MacBook due to licensing issues. You may need to reinstall Microsoft Silverlight.
Rm /Library/PrivilegedHelperTools/2.helperĮcho " Making your Mac forget about Office 2016." Rm /Library/PrivilegedHelperTools/.helper Rm -rf /Library/Preferences/ByHost/com.microsoft Rm -rf "/Library/Application Support/Microsoft/MAU2.0" Rm "/Users/$(whoami)/Library/Group ContainersUBF8T346G9.OfficeOsfWebHost" Rm "/Users/$(whoami)/Library/Group ContainersUBF8T346G9.Office" Rm "/Users/$(whoami)/Library/Group ContainersUBF8T346G9.ms" Rm /Users/$(whoami)/Library/Containers/-XPCService Rm /Users/$(whoami)/Library/Containers/365ServiceV2 Rm -rf "/Applications/Microsoft Word.app" Rm -rf "/Applications/Microsoft PowerPoint.app" Rm -rf "/Applications/Microsoft Outlook.app" Rm -rf "/Applications/Microsoft OneNote.app" Rm -rf "/Applications/Microsoft Excel.app" # commands out of the official guide from microsoft It does not remove Teams, I've not ammened it, but other than that it does a good job.
I'm confused as to why you are using composer to install a script? Any script can run direct from within a policy. "/Users/$consoleuser/Library/Group Containers/UBF8T346G9.OfficeOneDriveSyncIntegration" "/Users/$consoleuser/Library/Group Containers/UBF8T346G9.OfficeOsfWebHost" "/Users/$consoleuser/Library/Group Containers/UBF8T346G9.Office" "/Users/$consoleuser/Library/Group Containers/UBF8T346G9.ms" # You should back up these folders before you delete them. # WARNING: Outlook data will be removed when you move the three folders listed below. "/Users/$consoleuser/Library/Containers/" "/Users/$consoleuser/Library/Containers/-XPCService" "/Users/$consoleuser/Library/Containers/365ServiceV2" "/Users/$consoleuser/Library/Preferences/" "/Users/$consoleuser/Library/Preferences/.plist" "/Users/$consoleuser/Library/Preferences/.ist" "/Users/$consoleuser/Library/Application\ Support/Microsoft\ Update\ Assistant/" "/Users/$consoleuser/Library/Application\ Support//" "/Users/$consoleuser/Library/Application\ Support/Microsoft AutoUpdate" "/Users/$consoleuser/Library/Application\ Support/Microsoft AU Daemon" Here is my MS Office uninstaller script:Ĭonsoleuser=$(ls -l /dev/console | awk '') Jamf has a script section so use Jamf to handle it since it runs as root anyways. Hi Macgeek, I would not use composer to package a script. Sudo rm -R /Users/*/Library/Containers/Microsoft* Sudo rm -R /Users/*/Library/Containers/'OneDrive File Provider' Sudo rm -R /Users/*/Library/Containers/com.microsoft* Sudo rm -R /Applications/Microsoft\ OneDrive.app Sudo rm -R /Applications/Microsoft\ To Do Sudo rm -R /Applications/Microsoft\ Teams.app Sudo rm -R /Applications/Microsoft\ Word.app Sudo rm -R /Applications/Microsoft\ PowerPoint.app Sudo rm -R /Applications/Microsoft\ Outlook.app Sudo rm -R /Applications/Microsoft\ OneNote.app Sudo rm -R /Applications/Microsoft\ Excel.app sh script is setup like this but with a lot more paths listed: Thanks! Why will the Terminal commands work in Terminal but not when I run them in Composer. If I copy one line and paste it into Terminal it will run and remove the file(s). The Composer package will remove all the applications after a while but most of the rest of the files aren't removed. Then a I have a script run that is sudo sh /path to. sh script and it is installed with Composer. I'm trying to remove all Office 365 applications and any file with the word Microsoft in it from all our Macs.