Skip to content

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.

Guide · Updated 22 October 2026

How do I lock the apps in the Dock?

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

After 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 lockSetting
Sizesize-immutable
Position on screenposition-immutable
Magnificationmagnify-immutable
Auto hideautohide-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.