Keeping your Mac workflows humming efficiently can suddenly become a frustrating experience when an OS update breaks your Dock automation scripts. For many power users and IT pros, scripted Dock configurations are a key part of a streamlined workflow—helping deploy app icons and shortcuts across machines consistently. But after an update to macOS Ventura or Sonoma, some users have noticed that their previously reliable Dock scripts no longer work.
TL;DR
If your Dock automation scripts stopped working after a macOS update, corrupted or outdated preference files (plists) might be the culprit. Cleaning up old com.apple.dock.plist and related property list files can restore expected behavior. This article walks you through identifying the issue, locating the right plist files to remove, and ensuring your Dock scripts start working again. It’s a simple fix once you know where to look.
Understanding the Problem: Dock Scripts Fail Post-Update
Dock automation scripts tend to fail silently after an OS update. Whether you’re using dockutil, custom bash scripts with defaults write commands, or MDM-based deployment tools like Jamf, your layout changes just don’t stick. You try to add an app or rearrange icons, and… nothing.
This often has less to do with the script itself and more to do with how macOS handles preferences between versions. Recent macOS updates—including Ventura (13.x) and Sonoma (14.x)—introduce stricter preferences management, impacting how the Dock’s state is stored and when it’s reloaded.
Suspect #1: The com.apple.dock.plist File
At the heart of all Dock behavior is a file named com.apple.dock.plist located in the user’s ~/Library/Preferences/ directory. In some cases, older or malformed preference settings in this file can conflict with the new OS’s expectations, causing Dock changes to be ignored or dropped.
After an update, macOS may preserve old plist data to maintain user customization. If you’re deploying scripts that rely on a “clean slate” or specific item order, this legacy data can inadvertently block your scripts from executing properly.
The Plist Cleanup Method That Worked
When everything else failed, this simple method proved invaluable:
- Quit the Dock application. Use Terminal to do this safely:
killall Dock - Delete the problematic plist file. Run:
rm ~/Library/Preferences/com.apple.dock.plist - Clear cached preference values:
defaults delete com.apple.dock - Reboot or relaunch the Dock:
killall Dock - Run your Dock script again. This time, it should apply cleanly.
This approach essentially resets the Dock to its default layout, allowing scripts to write fresh preferences without being overridden by legacy data.

Why This Works: The Role of Cached Preferences
macOS caches application preferences heavily for performance. When you change a property’s value using Terminal or a script, it doesn’t always update the actual plist file until later—or sometimes not at all if macOS detects a conflict.
By removing the file and clearing the defaults domain for com.apple.dock, you’re forcing macOS to regenerate a fresh plist with clean defaults. This eliminates conflicting entries that might prevent your scripted Dock layout from taking effect.
Bonus Tip: Use dockutil with Care
If you’re scripting with dockutil, be sure you’re using the latest version compatible with your OS. Older versions may not recognize structure changes in macOS Ventura+ and silently fail.
When in doubt, use dockutil’s verbose flag to help diagnose issues:
dockutil --add /Applications/Safari.app --position beginning --verbose
This may highlight when preferences aren’t getting written due to permission issues, sandbox restrictions, or corrupt settings.
Additional Files to Watch
While com.apple.dock.plist is the primary preference file, you may also want to check and clear these related files:
~/Library/Preferences/com.apple.spaces.plist~/Library/Preferences/ByHost/com.apple.dock.*.plist
These sometimes store auxiliary information about Mission Control setups, screen configurations, and monitor arrangements. A mismatch here can also throw off automation scripts, especially in dual-screen setups or for users with saved “space” configurations.
Before You Delete: Make a Backup
It’s worth mentioning that deleting plist files resets user preferences. If you’re on a shared or managed machine, consider backing up the current Dock plist file first:
cp ~/Library/Preferences/com.apple.dock.plist ~/Desktop/com.apple.dock.plist.backup
This way, if something goes wrong or the user needs their old layout back, you can restore it later with:
cp ~/Desktop/com.apple.dock.plist.backup ~/Library/Preferences/com.apple.dock.plist
And then reload the Dock with:
killall Dock
When Scripts Still Won’t Work: Things to Check
If cleaning up the plist still doesn’t restore script functionality, consider these troubleshooting steps:
- Check Permissions: Ensure the script is being run under the correct user with write access to Preferences.
- Check SIP (System Integrity Protection): Some scripts may require full disk access or additional TCC permissions to run post–macOS Catalina.
- Profile Conflicts: If using MDM profiles, ensure no conflicting configuration profile is dictating a read-only Dock setup.
Automate the Cleanup
If you’re deploying multiple Macs or managing a fleet via a solution like Jamf or Munki, consider bundling this cleanup method into your deployment script for post-update recovery:
#!/bin/bash
killall Dock
rm ~/Library/Preferences/com.apple.dock.plist
defaults delete com.apple.dock
killall Dock
# Now reapply your Dock configuration here
This way, even if macOS carries over a user’s broken preferences during upgrade, your automation script restores full functionality with minimal manual intervention.
Final Thoughts
Dock automation is fragile, especially across OS versions. But often, the issue isn’t in your script—it’s in how macOS handles legacy preferences behind the scenes. Pinpointing com.apple.dock.plist as the source of conflict and resetting it can bring your workflow back to function with just a few Terminal commands.
Whether you’re a sysadmin managing dozens of machines or a power user who likes their Dock just so, knowing how to flush out stale plist files is a valuable tool in your Mac command-line toolbox.
Happy scripting!
