Posted on 09-05-2019 08:12 AM
I'm looking to create a script to uninstall TeamViewer as part of user initiated enrollment into JAMF Pro.
I found this discussion here: https://www.jamf.com/jamf-nation/discussions/22216/uninstall-teamviewer-via-script-or-terminal
I have limited scripting knowledge, so I took the script from that discussion, and made some small tweaks.
The script works as designed, but deleting the security agent plugin crashes the OS on reboot and requires a format/reload. I'm curious if anybody has any insight into what's going on there.
Posted on 06-26-2020 12:59 PM
Bump. Looking for a solution as well.
Posted on 06-27-2020 12:51 PM
Looks like the removal of TeamViewerAuthPlugin.bundle is leading to the issues you are facing.
Found this script in MacAdmins TeamViewer section:
#!/bin/bash
# TeamViewer full uninstall, from TV support.
# Does what clicking 'Uninstall' does in TV Advanced preferences
# Quit TeamViewer
/usr/bin/osascript -e 'quit app "TeamViewer"'
# Unload TeamViewer Helper
/bin/launchctl remove com.teamviewer.Helper
# Remove app
/bin/rm -rf /Applications/TeamViewer*
# Remove helper
/bin/rm /Library/PrivilegedHelperTools/com.teamviewer.Helper
# Remove config
/bin/rm /Library/Preferences/com.teamviewer*
# Recursively remove user configs
for u in /Users/* ; do
/bin/rm -f "$u"/Library/Preferences/com.teamviewer*
done
exit
This script omits the modification of the Authorization Database which is protected by SIP, so it is best not to modify.