10

I recently happened to look at my system.log file and noticed the following messages over and over:

Mar 4 12:09:32 ix com.apple.xpc.launchd[1] (com.teamviewer.teamviewer[11506]): Service could not initialize: Unable to set current working directory. error = 2: No such file or directory, path = /Applications/TeamViewer.app/Contents/MacOS: 15D21: xpcproxy + 12028 [1353][<>]: 0x2

Mar 4 12:09:32 ix com.apple.xpc.launchd[1] (com.teamviewer.desktop[11507]): Service could not initialize: Unable to set current working directory. error = 2: No such file or directory, path = /Applications/TeamViewer.app/Contents/Resources: 15D21: xpcproxy + 12028 [1353][<>]: 0x2

Mar 4 12:09:32 ix com.apple.xpc.launchd[1] (com.teamviewer.teamviewer): Service only ran for 0 seconds. Pushing respawn out by 10 seconds.

Mar 4 12:09:32 ix com.apple.xpc.launchd[1] (com.teamviewer.desktop): Service only ran for 0 seconds. Pushing respawn out by 10 seconds.

TeamViewer is not installed on my Mac, and has not been for a long time. So the above is obviously looking to run something in a path that no longer exists. However, seeing launchctl involved, I ran launchctl list | grep team and lo and behold I found a couple of entries related to TeamViewer. So then I tried the following commands:

sudo launchctl stop com.teamviewer.service
sudo launchctl stop com.teamviewer.teamviewer
sudo launchctl stop com.teamviewer.Helper
sudo launchctl stop com.teamviewer.service
sudo launchctl unload /Library/LaunchAgents/com.teamviewer.teamviewer.plist
sudo launchctl unload /Library/LaunchAgents/com.teamviewer.teamviewer_desktop.plist
sudo launchctl unload /Library/LaunchDaemons/com.teamviewer.*
sudo launchctl remove /Library/LaunchDaemons/com.teamviewer.*
sudo launchctl remove /Library/LaunchAgents/com.teamviewer.*
sudo rm /Library/LaunchAgents/com.teamviewer.*
sudo rm /Library/LaunchDaemons/com.teamviewer.*

There are no more files I can find that are related to TeamViewer. Now sudo launchctl list | grep team and launchctl list | grep team both show no output, which suggests everything should be stopped and removed. But I still see the above messages every 10 seconds in system.log, even after running all those commands!

How do I make it stop?!

5
  • According to the TeamViewer info I found here, the TeamViewer app itself, under Preferences > Advanced has its own Uninstall feature. You may just have to download and install the app once more to uninstall it.
    – IconDaemon
    Mar 4, 2016 at 19:50
  • @IconDaemon Fortunately I was able to find the old DMG (definitely don't want to try to install a newer version only to find it can't properly uninstall an older version) and this worked, but I'm still hoping to figure out how it's possible that I can completely remove all traces from launchctl and still have launchctl trying to run something.
    – Michael
    Mar 4, 2016 at 19:53
  • So you ran the uninstaller from the older version and launchctl is still trying to launch it?
    – IconDaemon
    Mar 4, 2016 at 19:55
  • @IconDaemon No, that fixed it. But supposing that I hadn't found a copy of the old installer, and the new version didn't manage to get rid of it, then I would be up a creek. So for future reference, I would like to understand why my commands didn't do the trick.
    – Michael
    Mar 4, 2016 at 20:12
  • This kind of behavior is usually the result of a leftover .plist file, startup daemon or something similar. Without an uninstaller you have to root through /Library/Application Support, /Library/LaunchAgents, /Library/LaunchDaemons, /Library/Preferences, /Library/StartupItems and ~/Library/Application Support,~ /Library/LaunchAgents, ~/Library/Preferences for any & all related files and delete them too.
    – KarlC
    Mar 5, 2016 at 1:25

5 Answers 5

11

This kind of behavior is usually the result of a leftover .plist file, startup daemon or something similar. Without an uninstaller you have to root through

  • /Library/Application Support
  • /Library/LaunchAgents
  • /Library/LaunchDaemons
  • /Library/Preferences
  • /Library/StartupItems
  • ~/Library/Application Support
  • ~/Library/LaunchAgents
  • ~/Library/Preferences

for any & all related files and delete them too. If the behavior persists after all that then use the find command in Terminal to see if you can find any instances of the offending app (or sudo find if necessary) just in case there's something leftover in the normally invisible "unix-y" folders at the root level of your drive.

6

I had the same problem. If you know a bit of Terminal , I suggest to do this on the command line:

find ~/Library/ -name 'com.teamviewer*'

and

find /Library/ -name 'com.teamviewer*'

This will probably show a few files, probably in ~/Library/Preferences and /Library/LaunchAgents, and maybe some other places. Then you remove those using

sudo rm /Library/LaunchAgents/com.teamviewer*

and similarly all other directories/files that came up with the find command.

You get the idea.

0
3

I originally tried to uninstall it and that made it worse, with TeamViewer logging 6-8 messages per second. So I then re-installed TeamViewer so I could uninstall it again, but this still left me with a couple of their services logging several messages per second.

In the end what worked for me was to use AppZapper.

2
  • Turns out I re-installed TeamViewer, and tried the uninstall again. Was left with a couple of their services logging several msgs/second, consistently. So I then used AppZapper and in the components displayed were the services mentioned in the log. ZAPP! GONE! Jul 5, 2017 at 6:42
  • Why the -1? If you don't like the format of the question that is one thing, but, the result was very helpful. The TeamViewer uninstall (latest version as of this date) left all kinds of processes, plist, and other files on my machine. AppZapper got rid of all of it. Jul 6, 2017 at 15:43
2

In my case it was the /Library/LaunchDaemons/com.teamviewer.* files trying to autolaunch the daemons at login. Removing these files manually resolved the issue. Same for com.crashplan.* files.

1

I went into /Library/Preferences and could not delete plist. As a result, I

  1. reinstall Teamviewer from website
  2. Go to preferences in top right drop down menu
  3. Go to Advanced
  4. Go to bottom of Advanced and click Uninstall

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .