Delete “Ghost” Accounts in Mail on OS X

I recently moved my website to a new host. As part of this, I also moved email accounts. While I was carrying out the move, I maintained two sets of accounts (I have accounts with several domains), but after the move, when I tried to delete the old accounts, I was unable to remove two of them. Not only could I not remove them in Mail, but they don’t show up in the Internet Accounts preference pane.

I scoured the web, and Apple’s support website, trying to find a solution, but wasn’t able to. One thing that clued me to a fix was a message that told me that I couldn’t delete the accounts because they were used by iCloud.

It turned out that the culprit was iCloud Keychain. I have this activated in the iCloud pane of System Preferences.

Icloud keychain

The problem is that the accounts are considered to be “in use” by other devices. Here’s how you can fix this problem.

  1. Turn of iCloud Keychain in the iCloud pane of System Preferences (see above). An alert will ask if you want to keep a copy of your data on your Mac; choose Keep on this Mac.

  2. Choose Mail > Preferences, and click Accounts. You’ll see the accounts you want to delete. Click one, and then click the – button below the accounts list. You should now be able to delete the account. If you have more than one ghost account, repeat this for the other accounts.

  3. Turn iCloud Keychain on again in System Preferences. If you have to, approve this from another device (another Mac, or an iOS device) that’s linked to your iCloud account.

  4. Go back to Mail. In my case, after the iCloud Keychain synced to my Mac, the accounts showed up again. But this time, I was able to select them and delete them, as in step 2 above.

You may have to repeat this on other devices to be able to remove the accounts from those devices.

30 thoughts on “Delete “Ghost” Accounts in Mail on OS X

    • You don’t need to turn off iCloud entirely, unless your comment is a veiled suggestion to avoid iCloud. 🙂

    • You don’t need to turn off iCloud entirely, unless your comment is a veiled suggestion to avoid iCloud. 🙂

  1. Wouldn’t you have solved the issue by deleting the corresponding entry in Keychain.app – password(s) for the offending email account(s)? There would be two entries for each account (send/receive). Oh, and eventually deleting secure notes that may be attached to said email accounts.

    • The only information in the keychain is the passwords. What I see in these accounts is all their information: mail servers, user names, passwords. So the keychain entry wouldn’t be enough.

      • No what I mean is: delete the keychain entry, then you won’t have to disable iCloud Keychain…

        On a related note, have you tried deleting the offending account through the Internet accounts pane in System Preferences? Iirc that is what I did last time; but ’t was a while ago, under 10.9.x

        • I don’t know if deleting the passwords would have helped. Remember, accounts are synced via iCloud, not just their passwords. So there’s information about the accounts that gets synced, but that’s not in the Keychain. If they show up in Internet Accounts, then you can easily delete them; the problem here is that they didn’t show up there. (I’ve added a sentence to the article to mention that). That’s what makes them “ghost” accounts.

  2. Wouldn’t you have solved the issue by deleting the corresponding entry in Keychain.app – password(s) for the offending email account(s)? There would be two entries for each account (send/receive). Oh, and eventually deleting secure notes that may be attached to said email accounts.

    • The only information in the keychain is the passwords. What I see in these accounts is all their information: mail servers, user names, passwords. So the keychain entry wouldn’t be enough.

      • No what I mean is: delete the keychain entry, then you won’t have to disable iCloud Keychain…

        On a related note, have you tried deleting the offending account through the Internet accounts pane in System Preferences? Iirc that is what I did last time; but ’t was a while ago, under 10.9.x

        • I don’t know if deleting the passwords would have helped. Remember, accounts are synced via iCloud, not just their passwords. So there’s information about the accounts that gets synced, but that’s not in the Keychain. If they show up in Internet Accounts, then you can easily delete them; the problem here is that they didn’t show up there. (I’ve added a sentence to the article to mention that). That’s what makes them “ghost” accounts.

  3. Seems for years my Mail rules don’t sync reliably. I have mail from a few select people with a different colored background. Right not just have two Macs & they’re not fully syncing.

  4. Seems for years my Mail rules don’t sync reliably. I have mail from a few select people with a different colored background. Right not just have two Macs & they’re not fully syncing.

  5. thanks I am so grateful, we build wordpress websites and host and I have about 10 clients who are having this problem including myself and finally found this article I love you, love you, love you. That was truly doing my head in. I have been a mac user from inception and am going off them fast.

  6. thanks I am so grateful, we build wordpress websites and host and I have about 10 clients who are having this problem including myself and finally found this article I love you, love you, love you. That was truly doing my head in. I have been a mac user from inception and am going off them fast.

  7. Thank you very, very much for this article. Incredibly helpful. I had several email accounts that didn’t show up in Internet Accounts, and was struggling with how to delete one of them. This was exactly what I needed.

  8. Thank you very, very much for this article. Incredibly helpful. I had several email accounts that didn’t show up in Internet Accounts, and was struggling with how to delete one of them. This was exactly what I needed.

  9. Thanks for the Keychain Access hint. I had a test email imap account, and deleted it from Mail but Mail is still trying to test the smtp server settings for some unknown reason. Mail’s testing the map smtp user & pass is getting me blocked by my hosting provider. Hopefully your Keychain Access tip will sort it out (fingers crossed)

  10. Thanks for the Keychain Access hint. I had a test email imap account, and deleted it from Mail but Mail is still trying to test the smtp server settings for some unknown reason. Mail’s testing the map smtp user & pass is getting me blocked by my hosting provider. Hopefully your Keychain Access tip will sort it out (fingers crossed)

  11. The whole iCloud keychain arrangement is one huge over-convoluted PITA. It might be worth it if it actually worked (by which I mean it helped Apple users stay safe, achieve their goals and be productive with their time) but my take on this is that it’s a massive hinderance. It’s also unreliable and seems to have security bordering on the paranoid. If Apple allowed you to at least use the same password as previously when, for the nth time, you have to wipe everything and start again it might be a tad more user friendly. For some reason my iCloud decided my password was no good. So I set a new one. Enter it n times for ITunes and iCloud etc. on my Mac. Repeat for my iPhone. Repeat for my iPad. Repeat for my AppleTV. Pausing to authorise each one as I go from one of the others. Then the Ghost email accounts appear. Find this article (life saver – thank you so much) and sort it out. Time taken to get precisely nowhere – around 3hrs. Thank you Apple. And it will happen again, because experience has shown that before long one of these accounts will complain that it requires the password, I will type in the same password as I used for 3hrs this evening, and it will reject it. And so we start over again… FFS.

  12. The whole iCloud keychain arrangement is one huge over-convoluted PITA. It might be worth it if it actually worked (by which I mean it helped Apple users stay safe, achieve their goals and be productive with their time) but my take on this is that it’s a massive hinderance. It’s also unreliable and seems to have security bordering on the paranoid. If Apple allowed you to at least use the same password as previously when, for the nth time, you have to wipe everything and start again it might be a tad more user friendly. For some reason my iCloud decided my password was no good. So I set a new one. Enter it n times for ITunes and iCloud etc. on my Mac. Repeat for my iPhone. Repeat for my iPad. Repeat for my AppleTV. Pausing to authorise each one as I go from one of the others. Then the Ghost email accounts appear. Find this article (life saver – thank you so much) and sort it out. Time taken to get precisely nowhere – around 3hrs. Thank you Apple. And it will happen again, because experience has shown that before long one of these accounts will complain that it requires the password, I will type in the same password as I used for 3hrs this evening, and it will reject it. And so we start over again… FFS.

Leave a Reply to Rosalind Evans Cancel reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.