Removing phantom/zombie shortcuts from an OSX sidebar.

Every so often a file accidentally gets dropped onto my OSX sidebar. Usually I can command-click and `remove from sidebar` via the contextual. If the file has been deleted, no contextual menu pops up.

I tried every trick posted on Apple’s forums to fix this , nothing worked.

Then I had an idea — what if I figured out what the file was, and then replaced that file. Would OSX let me delete it from the sidebar manually ?

It did! FINALLY!

So here’s what did work on my 10.6.8 Macbook :

After a bit of `grep`ping, I found the offending entry in “~/Library/Preferences/”

It’s a binary plist, so it’s a pain to edit directly.

Looking at the contents via `more` or `vi` , I found the offending entry along with what looked to be a file path. There was a pointer to the file in “/Users/jvanasco/.Trash/NONEXISTANT_FILENAME”

This worked on first try:

1. `touch /Users/jvanasco/.Trash/NONEXISTANT_FILENAME`
2. restart ( “Force Quit” by clicking command+option+esc, then selecting Finder”
3. select the bad item on the sidebar, command-click, and delete via the contextual menu item