MacOS – OS X Dock wont let me remove icons

catalinadockhigh sierramacos

Suddenly since yesterday my dock contains 3 apps/folder that I cannot remove:

  • App Store (represented with ? icon)
  • System Preferences (represented with ? icon)
  • Applications folder

Neither lets me remove it from the dock.

enter image description here enter image description here

I was using High-Sierra and now Catalina – same thing. I've tried killall Dock and killall Finder but nothing changed, I've deleted the dock.plist and restarted but nothing happened as well.

How can I solve this? Thanks.

P.S. Regarding the two apps, both "normal" versions can be added and removed from the dock, I don't know where this two "ghosts" came from. Same for all folders (excluding Applications).

EDIT 1: 29-11-2019 10:30 UTC:
I thought I've solved it but no.
I made a search by com.apple.dock and found another .plist at /Library/Managed Preferences/[user]/com.apple.dock.plist:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
    <key>MCXDockSpecialFolders</key>
    <array/>
    <key>contents-immutable</key>
    <false/>
    <key>static-apps</key>
    <array>
        <dict>
            <key>mcx_typehint</key>
            <integer>1</integer>
            <key>tile-data</key>
            <dict>
                <key>file-data</key>
                <dict>
                    <key>_CFURLString</key>
                    <string>/Applications/System Preferences.app</string>
                    <key>_CFURLStringType</key>
                    <integer>0</integer>
                </dict>
                <key>file-label</key>
                <string>System Preferences</string>
            </dict>
            <key>tile-type</key>
            <string>file-tile</string>
        </dict>
        <dict>
            <key>mcx_typehint</key>
            <integer>1</integer>
            <key>tile-data</key>
            <dict>
                <key>file-data</key>
                <dict>
                    <key>_CFURLString</key>
                    <string>/Applications/App Store.app</string>
                    <key>_CFURLStringType</key>
                    <integer>0</integer>
                </dict>
                <key>file-label</key>
                <string>App Store</string>
            </dict>
            <key>tile-type</key>
            <string>file-tile</string>
        </dict>
    </array>
    <key>static-only</key>
    <false/>
    <key>static-others</key>
    <array>
        <dict>
            <key>mcx_typehint</key>
            <integer>2</integer>
            <key>tile-data</key>
            <dict>
                <key>file-data</key>
                <dict>
                    <key>_CFURLString</key>
                    <string>/Applications</string>
                    <key>_CFURLStringType</key>
                    <integer>0</integer>
                </dict>
                <key>file-label</key>
                <string>Applications</string>
                <key>file-type</key>
                <integer>2</integer>
            </dict>
            <key>tile-type</key>
            <string>directory-tile</string>
        </dict>
    </array>
</dict>
</plist>

Deleted this bastard, killall Dock, and back to normal. The good one is at /Users/[user]/Library/Preferences/com.apple.dock.plist

But today, when I booted my Mac this icons came again… And the procedure I follow yesterday doesn't work anymore. Removing the "bad" .plist or replace it with the good one, does nothing. Even after a reboot or killall Dock 🙁

EDIT 2: 29-11-2019 15:37 UTC:
After performing the actions suggested by @NathanStrik nothing happened except that this time, after deleting the "bad" .plist and killall Dock the icons disappeared. This is so confusing…

Best Answer

Have you checked if your Dock is maybe locked? You could try out the following command in the Terminal app:

defaults write com.apple.dock contents-immutable -bool false

(the above command unlocks the dock)

Then force-quit and restart the dock by typing:

killall Dock

Then try to right-click (or CMD click) on the question marks in the dock, and under "options", choose to remove them.

Hopefully this helps... if not I'll do some more digging for you.

Source: https://forums.macrumors.com/threads/unable-to-remove-greyed-out-question-marks-in-dock.1701440/post-18705823