How to clear list of servers "Choose a mac" list in OS X Server App

How can I clear the "Choose a Mac" list? I have 3 entries of the same machine, same ip address but different host names?

I have the latest OS X Server 5.1 installed on a Mac mini with a static ip address. I use OS X Server on my iMac (local network) to connect to it and manage the server settings. I have reinstalled OS X Server on the mac mini a couple times and used different host names. Now the list is long, with entries/logins of the same machine.


On the client mac (non-server):

Quit Server.app

Activate Finder, hit Cmd-Shift-G and navigate to ~/Library/Preferences

Find "com.apple.Server.v4.plist" and change its name to "com.apple.Server.v4.OLD.plist" or something similar. Move it to the Desktop if you wish, but don't delete it so that you can easily reinstate it if necessary.

When you reopen Server.app it should present the first-time splash screen, asking what you want to do. Select the option relating to 'another machine'.


I think it always shows servers on the local network, you can't remove those.

You can delete just the recentServers part of the file if you don't want to remove all of your preferences:

defaults delete ~/Library/Preferences/com.apple.Server.v4.plist recentServers

If you want to delete a specific item first figure out the item's position in the array:

/usr/libexec/PlistBuddy -c "print recentServers" ~/Library/Preferences/com.apple.Server.v4.plist
Array {
    Dict {
        IPAddress = 192.168.1.8
        addresses = Array {
            blaster.example.com
            192.168.1.8
        }
        hardwareIdentifier = Macmini6,2
        hostName = blaster.example.com
    }
    Dict {
        IPAddress = 192.168.1.9
        addresses = Array {
            omegasupreme.example.com
            192.168.1.9
        }
        hardwareIdentifier = Macmini4,1
        hostName = omegasupreme.example.com
    }
}

To delete the 2nd item in the list (starting with 0):

/usr/libexec/PlistBuddy -c "delete recentServers:1" ~/Desktop/com.apple.Server.v4.plist