dockutil remove items error

tranatisoc
New Contributor II

hi - i'm trying to remove a default macOS dock items by using the following command:

sudo /Users/joeblow/dockutil-master/scripts/dockutil --remove "/Applications/Siri.app" --allhomes

the error:

item /Applications/Siri.app was not found in /Users/joeblow/Library/Preferences/com.apple.dock.plist

thanks for any insight.

5 REPLIES 5

ICTMuttenz
Contributor

Do you install also the dockutil on the mac?

try this one:

#!/bin/bash

    currentUser=$(python -c 'from SystemConfiguration import SCDynamicStoreCopyConsoleUser; import sys; username = (SCDynamicStoreCopyConsoleUser(None, None, None) or [None])[0]; username = [username,""][username in [u"loginwindow", None, u""]]; sys.stdout.write(username + "
");')

    /usr/local/bin/dockutil --remove "Siri" /Users/${currentUser}

exit 0

tranatisoc
New Contributor II

thanks ICTMuttenz. working now

tranatisoc
New Contributor II

just 2 follow-up questions.

1) is it possible to do more than 1 items removal using 1 command. i tried to do by adding another app but failed.

2) when i tried to use a similar command, the item gets added but with a question mark on the dock.

here's my syntax:

sudo /Users/$log/.dock/dockutil-master/scripts/dockutil --add "Adium" /Users/$log

or sudo /Users/$log/.dock/dockutil-master/scripts/dockutil --add "/Applications/Adium" /Users/$log

please assist. thx

dsavageED
Contributor III

This isn't my code, but you might want to have a look at DockutilAddRemoveArrays.sh this will let you hundle multiple items.

ICTMuttenz
Contributor

@tranatisoc do you still ned help?