How to lock the Dock on macOS

I've occasionally needed to fix certain aspects of the Dock on some people's computers - one particular case comes to mind was an elderly client who somehow...

I’ve occasionally needed to fix certain aspects of the Dock on some people’s computers - one particular case comes to mind was an elderly client who somehow would remove the Mail icon from the Dock, and then be unable to send or receive emails.

Over at the iDownload Blog there’s an article with some very handy defaults write snippets that can lock parts of the Dock, without having to lock the entire thing.

https://www.idownloadblog.com/2020/01/15/how-to-lock-the-dock-on-mac/

To summarise - you can lock the position of the Dock, you can lock the size of the Dock and you can lock the contents of the Dock - all independently of each other.

Position:

defaults write com.apple.Dock position-immutable -bool true; killall Dock

Size:

defaults write com.apple.Dock size-immutable -bool true; killall Dock

Contents:

defaults write com.apple.Dock contents-immutable -bool true; killall Dock

To undo any of these, use defaults delete to remove the property.

Keep This Useful

Spotted something outdated or unclear?

If a step has changed, a screenshot no longer matches, or something here just does not work the way it should, get in touch and we will take a look.