How to delete your Apple ID account from Messages on your Mac

How to delete your Apple ID Messages account on your Mac.

Whenever you sell, donate, return to your employer or otherwise decommission an old Mac, it is of utmost importance to clean your private data from it. If you have set up your Messages app it would be wise to delete your Apple ID account from it rather than simply logging out of it. Unfortunately (and amazingly) this is frustratingly difficult to do - you can't just highlight the account and delete it for some odd reason. There is, however, a roundabout way to get the job done; here's how to do it:

  1. First off, just to see the problem, open Messages and open Preferences in the Messages menu in the top left. Click on the Accounts tab and note the shaded out minus sign when your Apple ID account is highlighted.
  2. How to delete your iCloud Messages account on your Mac.
  3. The way to get rid of your account is through deleting the data stored by the Messages app in .plist files, which are basically XML files developed by Apple to store application data. The easiest way to do this is through a terminal window, so open your Finder then go to Applications -> Utilities and open
  4. To remove the appropriate files, type the following commands, hitting return after each one:

    cd ~Library/Preferences/

    Now change directory to ByHost with:

    cd ByHost/

    Now list the files with "idstatuscache" with the following command:

    ls *idstatuscache*

    This will return a file with a unique string in the name (that's why we listed it, so we could see the name). Now delete it with:

    rm unique string.plist

    You can just hit the tab key after you have typed up to the end of idstatuscache, it will fill in the rest.

  5. How to remove your Apple ID account from Messages on your Mac.
  6. To remove your chat history, use the following commands:

    rm ~/Library/Messages/chat.db*
    rm -rf ~/Library/Messages/Archive
    rm -rf ~/Library/Messages/Attachments

  7. Now restart your Mac for good measure. The files you deleted will re-spawn but won't have your Apple ID account data in them. Open up Messages -> Preferences and click the Accounts tab. You will see there is no longer an iMessage account using your Apple ID; mission accomplished.
  8. How to delete your Apple ID Messages account on your Mac.

Thanks to mluisbrown for sleuthing this one out.