Clear iMessage Chat History in Mac OS X
The Messages app for Mac keeps track of all chat history through iMessage and SMS, providing you with a lengthy record of conversations in an easily reviewable and scrollable chat log. Unlike iOS, there isn’t an in-app method to delete the chat history in OS X, and though you can close a window it doesn’t necessarily remove all data, logs, caches, or associations with a specific chat, and those caches are still stored on the Mac.
Instead, if you wish to clear out the chat log history in Messages app for OS X, you will have to turn to the Finder or command line if you want to trash your message history on the Mac. This is not difficult, it’s just a matter of removing a few files as detailed below.
How to Remove All Chat History from Messages in Mac OS X
This works in all versions of the Messages app for Mac, from the earliest versions to the newest:
- Quit out of Messages for Mac
- Hit Command+Shift+G to bring up the “Go To Folder” window
- Enter ~/Library/Messages/
- Select all files in the Messages directory and move to trash, files will be named chat.db, chat.db-shm, chat.db-wal, etc
- Empty the Trash and relaunch iMessages
When you relaunch the Messages app none of your previously existing conversations will contain any data.
Keep in mind that the conversation Attachments are stored in a separate folder and handled separately within ~/Library/Messages/Attachments/ which includes things like pictures, gifs, videos, text files, zips, audio clips, and whatever other attachments were sent through the messages app of OS X. Thus, if you wanted to be thorough about deleting all history and cache from the Messages client, you’d need to visit that Attachments directory and remove those files as well. If there are any images you want to save locally from the Messages app or a conversation, preserve them before deleting them or that folder, otherwise they would be gone for good.
Clearing iMessage Chat History on the Mac from the Command Line
You can also do this through the command line if you’re comfortable with using terminal and the rm command with a wildcard, which is generally considered advanced. To do that, quit out of iMessage and open Terminal, at the prompt type the following:
rm -r ~/Library/Messages/chat.*
Then, to trash the attachments, images, zips, and other data caches:
rm -r ~/Library/Messages/Attachments/??
Remember the command line is completely unforgiving and files are removed immediately and permanently, only do this if you know exactly what you’re doing and why you’re doing it.
Relaunch iMessages and to find an empty chat history.
Both of these tricks work as far back as the original iMessages for Mac beta, as well as all modern incarnations of the OS X Messages app, including in OS X Yosemite where Messages has direct tie-ins with the iOS messages app.
Keep in mind that when you delete the caches and chat logs from Messages app, the app will open up blank with no prior messages loaded, and all prior conversations will be cleared. That’s the whole point of this procedure, after all.
There may be an easier way to delete chat history from the Messages app of OS X, but at the moment there is no specific option in the preferences of the Mac app, so the above tricks will have to suffice.
For those on the iOS side of things, deleting Messages from the iPhone and iPad as shown here is easy but works a bit different, allowing you to select individual message threads, portions of messages, or all of them, to remove as appropriate.
Thanks for the tip Kevin!