Cannot remove item from Finder sidebar
Note that there are other questions on Ask Different with similar issues, but this appears to be different to those - none of the solutions offered in the above questions solve the issue.
I'm using macOS Mojave version 10.14.1 (18B75). In the past few days, 'Desktop' has appeared in my Favourites sidebar in Finder.
'Remove from Sidebar' is an option if I right-click the item:
If I click this, the item disappears for a fraction of a second, and then reappears.
The same thing happens if I try to remove the item in the Finder Preferences:
And, unlike one solution offered on Ask Different, toggling my User folder in the Finder Preferences doesn't solve the issue.
How can I make Desktop disappear permanently?
Solution 1:
Ok, I'm not going to pretend I know what's happening here but try deleting the file where that info is stored:
$HOME/Library/Application Support/com.apple.sharedfilelist/com.apple.LSSharedFileList.FavoriteItems.sfl2
I would bet that there's something corrupted in there. Delete it, log out and log back in or reboot, and try to remove it again. See if that helps.