Remove non-existent AFP server from Finder sidebar? For a while, I had a Linux-based AFP server in my network. Due to issues not related to this question, I've decided to switch it off. Problem is - the server still appears in the Finder sidebar. The original server name was hostname-afp, and for a few weeks, the entry of that name was still visible in the sidebar. About a week ago, the name changed to hostname-2-afp, now it is hostname-3-afp. Where does Finder store the reference to that server, and how do I remove it? 

Unchecking the servers in the Finder preferences does not remove the server from the sidebar. Unchecking the Bonjour Computers does remove it, but I'd like to keep the Bonjour feature enabled, and re-checking Bonjour Computers makes the ghost entry reappear as well. Cmd-/Ctrl-/Whatever-Dragging the entry does nothing.

(El Capitan / 10.11.6)
You probably configured Avahi (a free zero-configuration networking implementation for Linux including multicast DNS/DNS-SD service discovery AKA Bonjour) manually to propagate the AFP-service running on your Linux server in the .local network.

Even after disabling the AFP service on the Linux server, the Linux server's Bonjour name will still be registered then and thus shown in the Mac's sidebar.

You can check this by entering dns-sd -B _afpovertcp._tcp in Terminal.app on the Mac.

So remove the manually created config file (here: /etc/avahi/services/afpd.service) and restart the avahi service (probably sudo service avahi-daemon restart) to get rid of the non-existing AFP server name in the Mac's sidebar.