macOS relies too much on applications to manage their own startup item configuration. Over time, this leads to vestigial entries building up in startup items.
Both System Settings and launchctl stink at startup item management.
One of the key features lacking in macOS is GUI + CLI options to query startup items by the very name listed in the Login Items & Extensions pane. This overcomplicates basic cleanup operations, and makes it easier for malware to hide.
An even lower level tool than launchctl, sfltool, provides some workarounds, though even these operations are still crude.
$ sudo sfltool dumpbtm
This outputs more practical information about startup items, including the name that appears in the Login Items & Extensions pane as well as a plist name. There is a lot of output, so recommend redirecting the output to a file, and then chowning it back to a normal user account.
However, even with the plist name in hand, launchctl still stinks at disabling and removing services. And the error handling is the pits. It generates vague errors insisting the user use a completely different operation, bootout
. But bootout uses a different syntax and gives few clues to resolve this.
One of the few options for cleaning up startup items is to nuke it from orbit:
$ sudo sfltool resetbtm
This removes all startup items.
That's another reason to keep a backup of the original sfltool dumpbtm
list, to prime you for which programs you want to re-register as startup items.
Note that some macOS applications have buggy code, causing their CLI/GUI to fail to register themselves as startup items. As a workaround for that, manually register the relevant startup item.
As a developer, please provide an automated uninstaller (.APP or .SH) in macOS application .DMG's. Or better yet, publish the application to Homebrew and the App Store.
- Hazel is a paid macOS application that assists with automatically cleaning up more related files, often including startup items, when applications are removed.
- Wikipedia: Comparison of antivirus software
Many applications forcibly re-register startup and extension entries. All is lost.