MainspringGuides › Lock Dock contents
macOS Guide

How to Lock the Dock So Apps Can't Be Added or Removed (Mac)

Updated July 2026 · 3 min read

A well-arranged Dock is fragile: one over-enthusiastic drag and an app flies off in a puff of smoke, or a child parks six games in the middle of your work apps. macOS has a hidden switch that freezes the Dock's contents completely — nothing can be added, removed, or rearranged until you unfreeze it. It's the difference between a Dock that's arranged and one that stays arranged. Works on Ventura, Sonoma, and Sequoia.

Arrange first, then freeze

The lock preserves whatever the Dock looks like at the moment you apply it, so do the housekeeping first: drag in the apps that belong, drag out the ones that don't, and put them in the order you want to live with. Then open Terminal (Applications → Utilities) and run:

# freeze the Dock's contents
defaults write com.apple.dock contents-immutable -bool true
killall Dock

The Dock restarts in a second. Now try to drag an icon off — it snaps back. Try to drag an app in — the Dock refuses to make room. Right-click an app and the Keep in Dock / Remove from Dock options stop having any effect. The layout is pinned.

What still works while locked

The lock is about layout, not function — the Dock remains fully usable:

Unlock it

# make the Dock editable again
defaults delete com.apple.dock contents-immutable
killall Dock

Everything is immediately draggable again. The lock is per-user, survives restarts and updates, and no System Settings pane will ever flip it behind your back — Terminal (or a tool wrapping it) is the only way in or out.

The full lockdown set

contents-immutable has three siblings, each freezing a different Dock property:

# lock the Dock's size
defaults write com.apple.dock size-immutable -bool true

# lock its position on screen (bottom/left/right)
defaults write com.apple.dock position-immutable -bool true

# lock the auto-hide state
defaults write com.apple.dock autohide-immutable -bool true
killall Dock

Apply any combination; each is reverted with its own defaults delete com.apple.dock <key> plus killall Dock. All four together produce a Dock that is, for practical purposes, read-only.

Where this earns its keep

One honest caveat: this is tidiness enforcement, not security. Anyone who can open Terminal can undo it — for real restrictions on a managed Mac, that's Screen Time or an MDM profile's job.

Clone a locked Dock to another account

Setting up several accounts — or several Macs — with the same frozen layout? Arrange and lock the Dock once, then export the whole configuration:

# save the complete Dock setup, locks included
defaults export com.apple.dock ~/Desktop/standard-dock.plist

In the other account (or on the other Mac), import and restart:

defaults import com.apple.dock ~/Desktop/standard-dock.plist
killall Dock

The imported Dock arrives with the same icons, order, size, and the contents lock already engaged. It's also your safety net: keep the exported file around and any future Dock experiment is one import away from undone.

Freeze it in one click

Mainspring ships the Dock's lock switches — contents, size, position — as labelled toggles among its 90+ hidden macOS settings. Arrange once, lock in one click, unlock just as fast.

Try Mainspring free →

Signed & notarized by Apple · 1-day free trial · $29 once