Unable to delete mail account

I had a few errors in my Mail account set ups, but I am unable to start from scratch because I keep getting this error on multiple accounts:


The account could not be removed


Account removal failed with error: “The operation couldn’t be completed. Unable to find an account for the UID given.”.


You can try deleting the account from the “Internet Accounts“ preference pane in System Preferences.


However, it is not listed under my Internet Accounts in System Preferences.

Any help would be greatly appreciated!

MacBook Pro, OS X Mavericks (10.9)

Posted on Oct 28, 2013 1:32 PM

Reply
29 replies

Dec 18, 2013 12:00 PM in response to scarlac

I figured out how to solve my problem! (The root of my problem may not have been the same as meglizwake's which started the thread—I don't know.)


In my case, the problem had to do with messed up permissions in files in ~/Library/Mail/V2/MailData. Because the permissions in many of those files (notably, I think, Accounts.plist) had gotten set so that I couldn't read and write, whatever I did to change those preferences in Mail, including deleting an account, were not being saved.


The fix was simple: File > Get Info on each file in that folder and change whatever you have to change under Sharing & Permissions until it says, "You can read and write."

Dec 30, 2013 4:12 PM in response to coryhart

oryhart



I figured out how to solve my problem! (The root of my problem may not have been the same as meglizwake's which started the thread—I don't know.)


In my case, the problem had to do with messed up permissions in files in ~/Library/Mail/V2/MailData. Because the permissions in many of those files (notably, I think, Accounts.plist) had gotten set so that I couldn't read and write, whatever I did to change those preferences in Mail, including deleting an account, were not being saved.


The fix was simple: File > Get Info on each file in that folder and change whatever you have to change under Sharing & Permissions until it says, "You can read and write."


Hi OryHart, thanks for this post, I may have the same problem with my Mail acct and I feel I can follow the same steps to fix this issue but I have a question for you. Onece you went into ~/Library/Mail/V2/MailData then you trash and delete Accounts.plist ? Or did you trash or delete any other document in MailData? Please let me know the step by step process you did in order to resolve my problem. Thanks a lot !


RC

Mar 19, 2014 5:43 AM in response to meglizwake

Hello All,


I wanted to pass a little extra love along. I am using Mavericks and had great pains removing the Yahoo Messenger account from INTERNET OPTIONS, and/or MAIL PREFERENCES. When I attempted to remove it by selecting the < - > to remove the account I received the prompt to enter the password for the Yahoo account. Entering the PW caused the SYSTEM PREFERENCES pane to ERROR.


What I did was:


First, quit Mail.app.


Method 1:

The fix is simple. Go to:

1. /Users/YOURUSERNAME/Library/Containers/

2. delete the folder com.apple.mail


Method 2:

1. Open Terminal.app

2. rm -rf /Users/`whoami`/Library/Containers/com.apple.mail


Scarlac's tip.


Then I had to go and make the Yahoo account inactive, then I could remove it all together.

Nov 6, 2014 9:28 AM in response to meglizwake

My problem was similar, I've tried to delete Gmail mailboxes in Mail app and I got the same error "The operation couldn’t be completed. Unable to find an account for the UID given"... Following the first advices on this chat, trying to delete com.apple.mail was a mess, all my stuff gone, personal mailboxes (On My Mac), etc... so that's not a solution to me.


I've just performed some accurate, just follow this:

1- Edit Account.plist file located in /Users/YOURUSERNAME/Library/Mail/V2/MailData/Accounts.plist with Xcode or a Plist editor (MAKE A COPY OF ORIGINAL Accounts.plist FIRST !!!, ex: copy it and rename it as Accounts_old.plist).

2- Look for each account you got with error (look for "MailAccounts" line, extend it, look for one by one each item (item 0, item 1, item 2, etc...) and locate "Account name" line in order to find the mailbox you want to delete, find it and delete the proper Item (ex: Item 3, Item 6, Item 8, and so on...). TAKE CARE ABOUT HAVING ACCOUNTS WITH SIMILAR NAMES OR EQUAL NAMES -same account name but different hosting, etc- DELETE THE PROPER ONE... just a tip: look inside each item content at the line that shows you the hosting provider like GMAIL, "YOUR DOMAIN", etc). Note that each time you delete an item the order of items is still the same (it's just a reorder of the content, the item you delete is really deleted... you know what I mean).


It worked for me.


P.S: it's an Alex Neil comment extended explanation 😉


I hope to help with this. Regards!

Dec 1, 2014 12:13 PM in response to SGINARD

SGINARD's fix worked for me. Though I had to run through SGINARD's steps, then when I opened Mail it prompted me for a new account (because I deleted the only one I have), I created the new account, but there was still some residual issues and the new account was not working properly, but I was now able to delete the account "normally" and then recreate the account one last time which finally fixed my issue.


Thank you.


p.s. I was having issues with the original account no longer getting mails from my Exchange server.

May 31, 2015 4:35 AM in response to meglizwake

I just spent 1.5 hours at the Genius Bar trying to get this same issue resolved. I had two accounts that I could not delete. They attempted everything they could think of deleting to get the mail accounts to clear up. But in the end the accounts still kept showing back up in Mail. [ and 3 Geniuses later]


Final Result: restored the Mac to factory settings and reinstalled programs fresh. I could have restored back to a recent backup but the Genius saw some things on the machine that indicated that there might be some corruption in other areas of the machine - although I was having no other issues.


Root Cause: according to the Genius they are seeing some problems because Mail is using the "cloud".

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Unable to delete mail account

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.