Finder sidebar duplicating entries

finderpreferences

I'm trying to figure out why one of my drives is appearing multiple times in the Finder sidebar.
If I drag the list order a new one is generated. Dragging out to the desktop, the normal way of deleting them, fails; it simply reappears immediately in the sidebar.

enter image description here

From georgegarside blog – Mac Finder Sidebar Favourites Location I discovered the names & locations of the two files possibly responsible.
~/Library/Preferences/com.apple.finder.plist
~/Library/Preferences/com.apple.sidebarlists.plist

I tried throwing them away, but that was considerably more trouble than it was worth, as defaulting the Finder views entirely is just too much work to put back how I like it.

The .plist files themselves look pretty complex, so I'm trying to figure out what I can safely delete to see if will restore normailty.

Best Answer

As I had backups of everything I decided to play fast & loose with copies of the two .plist files.

I dropped both files into BBEdit & tried to make sense of the reams of data.
The sidebar file looked at a glance more promising so I started with that.

I realised it had several thousand aliases to disk drives, SD Cards, CDs, RAMDisks & disk images permanent & temporary, dating back over perhaps a decade.

enter image description here

Carefully selecting sections from <dict> to </dict> in each case, I deleted all aliases except the one that contained SeenAsBootVolume. Saved & relogged.

Success. The current list rebuilt itself, the myriad 'spares' were gone & the drive no longer duplicates if I move/drag items in the list.

As a hint as to just how many old drive aliases I did actually delete - the file was 82MB… it is now 9KB.

enter image description here

…and, no, the date modified on the older one doesn't make any sense to me either;)