In macOS, system background services, scheduled tasks, and critical interface components (such as the Dock, Finder, WindowServer, and networking daemons) are managed by the unified init and daemon supervisor: launchd. In older versions of macOS, administrators frequently used launchctl unload followed by launchctl load to refresh running services. However, in modern macOS releases (macOS Monterey, Ventura, Sonoma, and Sequoia), Apple deprecated that workflow in favour of the modern sub-command syntax centered on launchctl kickstart.
The launchctl kickstart command allows users to terminate and instantly respawn running daemons or launch agents cleanly without leaving stale state or requiring a system restart.
Why Use kickstart Instead of kill or killall?
While using kill -9 <PID> or killall Dock terminates a process, it relies on launchd detecting an unexpected crash before attempting a restart. In contrast, launchctl kickstart sends an explicit, structured command directly to the launchd supervisor:
- Graceful State Transition: Instructs
launchdto terminate existing instances and immediately re-read service definitions. - Guaranteed Respawn: By supplying the
-k(kill) flag,launchctlterminates the target process and immediately spawns a fresh instance with pristine memory and file descriptors. - Accurate Domain Targeting: Operates explicitly within user domains (
gui/UID/) or system domains (system/), eliminating ambiguity across multi-user environments.
Command Syntax and Key Modifiers
The standard syntax for modern service restarting follows this structure:
launchctl kickstart [options] <service-target>
The table below summarizes available modifier flags:
| Flag | Function | Operational Role |
|---|---|---|
-k |
Kill Existing Process | Terminates the currently running process before starting a replacement instance. |
-p |
Print PID | Outputs the Process ID (PID) of the freshly spawned instance to stdout. |
gui/<UID>/ |
User GUI Target Domain | Targets services belonging to the logged-in graphical user session (e.g., gui/501/). |
system/ |
System Target Domain | Targets root-level background daemons (requires sudo). |
Determining Your User ID (UID)
User launch agents run within your specific graphical session domain. Before targeting user-level services, identify your numeric UID:
id -u
On single-user Macs, the primary account UID is almost universally 501.
Practical Examples: Restarting Native macOS Services
1. Restarting the macOS Dock and App Exposé
If the Dock freezes, desktop spaces fail to transition, or icon badges become stuck, restart the Dock agent cleanly:
launchctl kickstart -k -p gui/$(id -u)/com.apple.Dock.agent
The -p flag will return the newly assigned PID of the active Dock process.
2. Restarting the Finder
To resolve file copy hangs, broken sidebar shortcuts, or unresponsive desktop icons:
launchctl kickstart -k gui/$(id -u)/com.apple.Finder
3. Restarting the Control Center and Menu Bar Items
If menu bar icons fail to update or Control Center sliders freeze:
launchctl kickstart -k gui/$(id -u)/com.apple.controlcenter
4. Restarting System Networking Daemons
To restart system-wide network configuration daemons without restarting your Mac (requires administrative privileges):
sudo launchctl kickstart -k system/com.apple.configd
Frequently Asked Questions
Why does kickstart return “Could not find service”?
Ensure you are specifying the full domain prefix (e.g., gui/501/ or system/) alongside the exact reverse-DNS bundle identifier. You can find active service labels using launchctl print gui/$(id -u).
Does launchctl kickstart start disabled services?
By default, kickstart respects the disabled state of a service in launchd. If a service has been explicitly disabled, add the -p or enable it via launchctl enable before restarting.