Dockutil --remove fails

lkrasno
Contributor II

Using version 2.0.2, seeing same results with 10.9.5 and 10.10.5, running CLI or through policy

administrator$ dockutil --remove '/Applications/Microsoft Office 2011/Microsoft Excel.app' --allhomes

item /Applications/Microsoft Office 2011/Microsoft Excel.app was not found in /Users/administrator/Library/Preferences/com.apple.dock.plist

also tried just using

administrator$ dockutil --remove '/Applications/Microsoft Office 2011/Microsoft Excel.app'

It does exist in the plist and I tried different combinations of ' ' and to deal with spaces

<string>com.microsoft.Excel</string> <key>dock-extra</key> <false/> <key>file-data</key> <dict> <key>_CFURLAliasData</key> <data> AAAAAADUAAMAAQAA0QwbhgAASCsAAAAAAC0M +AA4/4oAANE4DXAAAAAACSD//gAAAAAAAAAA /////wABAAgALQz4AAAAGgAOACgAEwBNAGkA YwByAG8AcwBvAGYAdAAgAEUAeABjAGUAbAAu AGEAcABwAA8AGgAMAE0AYQBjAGkAbgB0AG8A cwBoACAASABEABIANkFwcGxpY2F0aW9ucy9N aWNyb3NvZnQgT2ZmaWNlIDIwMTEvTWljcm9z b2Z0IEV4Y2VsLmFwcAATAAEvAP//AAA= </data> <key>_CFURLString</key> <string>file:///Applications/Microsoft%20Office%202011/Microsoft%20Excel.app/</string> <key>_CFURLStringType</key> <integer>15</integer>

1 ACCEPTED SOLUTION

mm2270
Legendary Contributor III

I don't think you need the full path when doing a remove. Try doing just

dockutil --remove "Microsoft Excel" --allhomes

The actual example in the help document actually shows this example:

dockutil --remove 'System Preferences' --allhomes

View solution in original post

3 REPLIES 3

mm2270
Legendary Contributor III

I don't think you need the full path when doing a remove. Try doing just

dockutil --remove "Microsoft Excel" --allhomes

The actual example in the help document actually shows this example:

dockutil --remove 'System Preferences' --allhomes

lkrasno
Contributor II

Awesome, thats just too easy :) Thank you!

mintzd01
New Contributor III
New Contributor III

I'm seeing a strange issue with dockutil 2.0.2 . When we run the command using Casper dockutil won't work.

If we run the command locally on the mac it works fine. This is on 10.10.5

What we get is the dock refreshing but nothing happening.

the log is as follows

Preparing Policy...
Executing Policy 2016-01-06 at 2:38 PM | jssadmin | 1 Computer...
Running command dockutil --remove 'TextEdit' --allhomes...
Result of command:
item TextEdit was not found in /Users/dcs/Library/Preferences/com.apple.dock.plist

Thanks