I regularly accidentally drag the Downloads folder from the dock to trash when trying to delete a recently downloaded file, removing it from he dock.

Is there any way to disable dragging and deleting icons from the dock? An equivalent of locking a file but for individual dock icons?

I don't want to lock the entire dock, just specific icons.

  • There is no way to lock specific icons in the Dock. You can lock all icons using the method in daniil-manokhin's answer. – Graham Miln Dec 17 '18 at 13:52
  • I'm curious as to how you manage that, as all that happens for me if I drag the Downloads Dock Tile off of the Dock or over to the Trash Dock Tile, it simply removes the Downloads Dock Tile if I let go of it, not into the Trash. What version of macOS are you running and is it actually putting the Downloads Dock Tile or the Downloads folder into the Trash? – user3439894 Dec 17 '18 at 16:05
  • It doesn't end up in Trash. It gets removed from the dock, as you describe. Updated question to clarify. – dunxd Dec 18 '18 at 17:08
  • 1
    I wonder if it would be possible to write a tweak that supports dragging the topmost item (the most recent one, in the usual configuration) instead of the whole stack. That would be sooo convenient. – hans_meine May 30 '20 at 14:50

I don't think it is possible to lock specific icons.

To lock all the icons go to Terminal and type:

defaults write com.apple.Dock contents-immutable -bool yes

Press enter then type:

killall Dock 
  • 1
    This is not what the OP needs, unfortunately, and its mentioned at the very end of the question. – IconDaemon Dec 17 '18 at 13:24
  • @IconDaemon I said it is not possible – user310476 Dec 17 '18 at 13:57
  • 1
    I know. The OP mentions in the question itself that the solution you provided will not work, thus your answer is not really an answer that will work. – IconDaemon Dec 17 '18 at 14:10
  • 1
    It wasn't what I needed, but it does answer the question (you can't do what I want) and provides the closest option (lock all icons) so a good answer and didn't deserve a down vote. – dunxd Jan 9 '19 at 15:00

Apple has not implemented support for this in the Dock, only the all-or-nothing approach is available.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .