Skip navigation

Remove App from Dock

942 Views 2 Replies Latest reply: Sep 29, 2011 12:06 PM by Mark Jalbert RSS
Mac Man Smith Level 1 Level 1 (15 points)
Currently Being Moderated
Sep 29, 2011 8:19 AM

I know how add an app to the dock using unix but how do you remove one from the Dock? I have read a lot about using plistbuddy to remove it but I can not figure it out. I want to put this script in a installer/uninstaller.

  • Mark Jalbert Level 5 Level 5 (4,385 points)
    Currently Being Moderated
    Sep 29, 2011 12:06 PM (in response to Mac Man Smith)

    Forget the looping, do the math in bash ->

    i=$(( $(defaults read persistent-apps | grep _CFURLString\" | awk '/What ever app/ {print NR}') -1 ))
    /usr/libexec/PlistBuddy -c "Delete persistent-apps:$i" ~/Library/Preferences/

    Note the missing colon at the start of persistent-apps. <comment>I'm not liking this new forum software</comment>


    Ok, I understand why you're  looping. But it would be silly to have more than one of the same app in the dock.


    Message was edited by: Mark Jalbert


More Like This

  • Retrieving data ...

Bookmarked By (0)


  • This solved my question - 10 points
  • This helped me - 5 points
This site contains user submitted content, comments and opinions and is for informational purposes only. Apple disclaims any and all liability for the acts, omissions and conduct of any third parties in connection with or related to your use of the site. All postings and use of the content on this site are subject to the Apple Support Communities Terms of Use.