How to Remove Microsoft Teams "Old"?

Mouthbaten_1911
New Contributor III

Guys, is there a script to remove the "old" microsoft teams from the macs using jamf? Is there a script? Or a removal tool? 

6 REPLIES 6

mfletch
New Contributor III

AJPinto
Honored Contributor III

The quick and dirty way is to just run sudo rm -rf "/Applications/Microsoft Teams.app". You can look for any supporting files and dependencies and delete them also, but nuking the app would be sufficient if your goal is to just remove it.

 

This is the tool to remove Office from macOS, but its probably overkill for what you are asking.

Office-Reset

macadmins.software/tools/

sdagley
Esteemed Contributor II

If you're running the command from Jamf Pro there's no need for the "sudo" preceding "rm", and be aware that Microsoft has decided to rename "Classic" Teams to "Microsoft Teams classic.app" in recent versions of the installer (that's for Standalone Classic and BusinessPro Suite installs)

howie_isaacks
Valued Contributor II

I probably shouldn't get so worked up about it but I get so annoyed when I see other Jamf admins using sudo in scripts deployed through Jamf Pro. The guy who had my job before me added a lot of scripts to the server that have sudo before a lot of the commands. The scripts work, but they bug me!

Deku91
New Contributor III

Hi, this is what I use to remove the Teams Classic App 

#!/bin/bash

# Quit Teams Classic if it's running
if pgrep Microsoft\ Teams\ Classic.app; then
killall "Microsoft Teams Classic.app"
fi

# Remove the Teams Classic app
rm -rf /Applications/Microsoft\ Teams\ Classic.app

# Remove any Teams Classic preferences
rm -rf ~/Library/Preferences/com.microsoft.teamsclassic.plist

# Remove any Teams Classic caches
rm -rf ~/Library/Caches/com.microsoft.teamsclassic

# Remove any Teams Classic logs
rm -rf ~/Library/Logs/com.microsoft.teamsclassic

Deku91, how did you write the script? I wrote it with a local file editior on the mac to run a test and didn't have any luck when I ran it.