How to lock the Dock so its apps, size and position cannot change
Stop icons being dragged out of the Dock by accident, or a shared Mac's Dock being rearranged. The hidden settings that lock contents, size and position.
How do I lock the apps in the Dock?
defaults write com.apple.dock contents-immutable -bool true && killall DockAfter the Dock restarts, icons cannot be dragged out, dragged in, or reordered. Open apps still appear while they run.
How do I lock the Dock's size and position?
| To lock | Setting |
|---|---|
| Size | size-immutable |
| Position on screen | position-immutable |
| Magnification | magnify-immutable |
| Auto hide | autohide-immutable |
Use each the same way, for example defaults write com.apple.dock size-immutable -bool true && killall Dock. The matching control in Desktop & Dock settings turns grey.
How do I unlock the Dock?
Run the same line with false in place of true. To clear every lock and setting at once, reset the Dock.
Who should lock the Dock?
- A shared or family Mac, where several people use one account.
- A Mac set up for a child or a relative who drags icons away by mistake.
- Anyone who keeps finding a favourite app missing from the Dock and does not know why.
Locking does not stop apps opening or closing; running apps still appear in the Dock while they are open, and disappear when you quit them if they are not kept there.
Set it up the way you want before you lock it: customise the Dock and add apps to it.
Checked on 22 October 2026 on a MacBook Air (M1) running macOS 27.0.1: contents-immutable, size-immutable, position-immutable, magnify-immutable and autohide-immutable are all present in the Dock.
Questions
How do I stop icons being removed from my Dock?
Run defaults write com.apple.dock contents-immutable -bool true, then killall Dock.
Can I lock the Dock size on a Mac?
Yes, with the size-immutable setting.
How do I unlock the Dock?
Run the same command with false instead of true.
Read next
- Guide
How to add apps to the Dock on a Mac, and keep them there
Drag an app in, or keep one that is open. How to add apps, folders and websites to the Mac Dock, and why an app you added keeps disappearing.
Read › - Guide
How to add a space between Dock icons on a Mac
There is no button for it, but one Terminal command adds a blank gap between Dock icons, so you can group apps. How to add one, move it and remove it.
Read › - Guide
How to stop app icons bouncing in the Dock on a Mac
An icon bouncing in the Dock means an app is opening or wants you. How to turn off the opening bounce, stop the attention bounce, and when to leave it on.
Read ›