Unable to sign out of iCloud on OSX Yosemite or disable Keychain

Solution 1:

Signing in in my iPhone and enable iCloud Keychain did the trick to me. So I restored the keychain in my iPhone and then the keychain switch in my Mac changed to off state as magic

Solution 2:

I have a separate personal + apps-only (was before family sharing came along) Apple IDs. I signed in to iCloud on my MBPr using my apps-only Apple ID so I can setup family sharing. I can't seemed to do this via web.

When it was time to sign out of the apps-only Apple ID, I encountered the same problem but the posted solutions doesn't work for me since I never signed in to iCloud on my other iDevices with the apps-only Apple ID. I've always used my personal Apple ID. the apps-only Apple ID is signed in though on iTunes but I don't think that's related.

Anyway, the solution for me was to delete ~/Library/Application Support/iCloud folder and ~/Library/Preferences/Mobile*.plist file. Restart OS X and sign in again! :)