[launchd-dev] Remove "disabled" services; Migrate from "old" launchd

Jerry Krinock jerry at ieee.org
Sun Aug 23 06:15:49 PDT 2015


Ever since 10.5, my apps have used long-running launchd agents to detect filesystem changes, and these in turn schedule one-shot agents to perform tasks.  They do this by writing and removing plist files in ~/Library/LaunchAgents, and by running launchctl with subcommands ‘load’ and ‘unload’.

I just discovered that running this command:

   launchctl print-disabled gui/`id -u`

shows hundreds of such services, probably every one which my app has created for the past year or more.  Apparently, my agents are not being completely removed, only “disabled”.  How do I remove them?

I tried ‘unbootstrap’, but got:

   Command is not yet implemented.

* * *

More broadly, is there an article which explains the recent changes in launchd, so that I can properly update my apps?  The current launchctl man page is incomprehensible to me until I get to the LEGACY SUBCOMMANDS section.  No more “agents", it seems; everything is a “service”.



More information about the launchd-dev mailing list