Stop the Dock from Getting Broken – Mac Kung Fu, 2nd Edition

Tip 72Stop the Dock from Getting Broken

It’s very easy to accidentally resize the Dock when using a Mac or delete icons from it. All it takes is a misclick of the mouse. The following two commands typed into a Terminal window will “freeze” the Dock, making it impossible to resize it or to remove/rearrange/add icons:

 
defaults write com.apple.dock size-immutable -bool TRUE
 
defaults write com.apple.dock contents-immutable -bool TRUE;killall Dock

To “unfreeze” the Dock so you can resize it and add/remove/rearrange icons, issue the following two commands in a Terminal window:

 
defaults delete com.apple.dock size-immutable
 
defaults delete com.apple.dock contents-immutable;killall Dock