I previously installed a really cringe-worthy app on impulse. It quickly turned out to be pretty much unusable. Even dragging it to the Trash failed, so I went straight to sudo and force-deleted the app. Then I manually parsed the .pkg and removed files one by one. TeamViewer, yes, that's the one.
A few days later, when checking the system log, I found it was still reporting TeamViewer launch failures. Only then did I remember I'd forgotten to remove the launchctl startup item.
launchctl startup items aren't complicated, and its documentation is quite detailed:
$ launchctl helpYou can see the general usage.
$ launchctl listCheck the startup list. You can easily find the relevant content.
$ sudo launchctl remove com.teamviewer.teamviewer
$ sudo launchctl remove com.teamviewer.desktopThen I easily cleaned it up.
In addition, there were still remnants left, so I also had to deal with /Library/LaunchAgent.
cd /Library/LaunchAgent
sudo rm -rf com.teamviewer.teamviewer.plist com.teamviewer.teamviewer_desktop.plistBy the way, for macOS it's best to stick with things from Homebrew or the App Store; anything beyond that, it's probably wise to be cautious. Personally, I only downloaded MPlayer. Carelessly grabbing some random external DMGs is simply torture for the soul.
Tip:
If you find startup items that can't be deleted, check: /Library/LaunchAgent, /Library/LaunchDeamon, and /Library/StartupItems — both the system-level and user-level versions.
Later I found that it also provides its own removal option; see here.
Comments · 3