Uninstalling Teamviewer script

New Contributor

We are looking to mass remove Teamviewer via a script as on deployment we made the mistake of just deploying through a pkg file and not indexing with a dmg file.

I have tried 2 other scripts that I've found on Jamf forums but none of these have worked.

The Teamviewer versions are v15 full on some and v15 host on others
Devices generally all running Big Sur but there may be some running Catalina

Any assistance would be greatly appreciated


Not applicable

Please test this a lot on test Macs before using it in production. I haven't done any testing with it. Use at your own risk, but might be a good jumping off point for you.


# uninstaller for teamviewer host (messy version), would def need to clean this up more.

# Unload/Stop TeamViewer host
launchctl unload /Library/LaunchDaemons/com.teamviewer.Helper.plist
launchctl unload /Library/LaunchDeamons/com.teamviewer.teamviewer_service.plist

# Murder the process (if anything is still running)
killall TeamViewer_Desktop
killall TeamViewer_Service

# Remove TeamViewer Host app
if [ -d /Applications/TeamViewerHost.app ]; then
    rm /Library/LaunchDaemons/com.teamviewer.Helper.plist
    rm /Library/LaunchDeamons/com.teamviewer.teamviewer_service.plist
    rm -Rf /Applications/TeamViewerHost.app
    if [ $? = 0 ]; then 
        echo "Successfully removed TeamViewerHost.app from this Mac..."
        echo "ERROR: Something failed when trying to remove TeamViewer from this Mac..."
        exit 1
   echo "TeamViewer Host app not found on Mac"

exit 0