Clear iMessage Chat History in Mac OS X

Mar 5, 2012 - 40 Comments

Deleting Messages Cache & 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 Mac 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 Mac 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:

  1. Quit out of Messages for Mac
  2. Hit Command+Shift+G to bring up the “Go To Folder” window
  3. Enter ~/Library/Messages/
  4. Select all files in the Messages directory and move to trash, files will be named chat.db, chat.db-shm, chat.db-wal, etc
  5. Empty the Trash and relaunch iMessages

Clear iMessage Chat History

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 Mac 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.

Mac Messages icon

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 Mac OS X Messages app, including in modern Mac OS versions 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.

iMessages for Mac

There may be an easier way to delete chat history from the Messages app of Mac OS, 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!

.

Related articles:

Posted by: Paul Horowitz in Mac OS, Tips & Tricks

40 Comments

» Comments RSS Feed

  1. Anyone? says:

    Has anyone figured out how to get on screen alerts to come back for messages? After deleting these files I no longer get notifications in the top right hand corner. I can’t figure out how to fix this!

    • paul says:

      Notifications are controlled in the Notifications preference panel on the Mac, and if you use Do Not Disturb that will hide the notifications as well.

  2. AH! says:

    I did this and all the chat history was deleted – which was good.

    However, now new my messages aren’t syncing with my phone. None of the new messages are being store on my computer at all. I’m also not receiving notifications for messages on my computer. I have not idea what to do!

  3. Kidane says:

    It was really good instruction. But I would add at the end you will need to restart the computer, so that everything you deleted will be disappeared from the block.

  4. help :( says:

    i used the trick (through the terminal) and i got a message saying

    “the messages database is being upgraded, please wait while it finishes or Quit Messages and relaunch it later.”

    its been like this for so long, how can i fix it? :((

  5. hotel says:

    don’t try this!
    Did exactly what was written above and now Messages doesn’t work anymore.

    “The Messages database is being upgraded, please wait while it finishes or Quit Messages and relaunch it later.”

    this message stays for hours.

    thx a lot

    • Donovan says:

      @hotel I also tried the suggestion (even though it a few years old) and though deleting the following files would work, chat.db-wal, chat.db-shm and chat.db. After deleting them and starting Messages I also got: “The Messages database is being upgraded…”

      To fix it I just recreated those files again ($ touch chat.db chat.db-wal chat.db-shm) and then worked. Even the messages were all there so clearly not stored in those files :) Still trying to find a good way to clear all messages…

    • nathan says:

      exactly

      • I just did it, this works fine to clear chat logs, but if you do anything wrong you can break just about anything. Some people have the expertise, others don’t. It sounds like this is a little too advanced for some of you less technical people out there, but the good news is there are other ways to clear chat transcripts in Messages for Mac, it’s even mentioned at the bottom of the article but that would require ‘reading’ which is a little complicated for some people these days:

        https://osxdaily.com/2015/05/22/clear-chat-transcript-messages-mac-os-x/

        Try that out. If that’s too advanced for you, you should get an iPad next time, it is less technical than a ‘computer’

  6. Helper says:

    The quickest way to delete them is by pressing Option+Command and Delete, hold that until all your conversations are deleted.

  7. Steve Jordan says:

    This is really bad for user privacy! Apple should really add a setting to remove logs after x days.

  8. Ted says:

    If I delete messages on my Mac OS X (MacBook Air), will they delete on my iPhone, too?

  9. Old 1 says:

    Some times friends change their email addresses, and so I’ve updated Contacts, and yet within iMessage their old email address still appears as an option within iMessage. How does one permanently delete inactive email addresses from the drop down when listed?

  10. Doll Joll says:

    Right click anywhere in the message history and you will see an option to “clear conversation”. That will delete the entire conversation.

    I wish there was a way to delete select messages from the conversation history

  11. faye says:

    Hey,
    this didn’t work for me. I searched “chat” and then over 900 files with phone numbers came up, I selected and sent all to trash then emptied trash. Once i reopened iMessages, all text boxes to everyone were still there but no content was there, so the actual texts all got deleted. Now i just need to figure out how to delete even the chat boxes.

  12. Josh Pope says:

    I wrote a shell script to remove all iMessage logs for you- it’s super convenient.. Just download and doubleclick: https://github.com/joshpopenyc/Shell-Scripts/

  13. silent simpleton says:

    there is a much easier way now.

    you just type “ichat” in your finder and it’ll show you every transcription with every phone number. use list view. pick the phone numbers you want to delete and then do secure trash erase.

    this way is better because you can delete selected threads instead of everything.

  14. Calculon says:

    To delete the Messages cache:

    1. Quit Messages application.

    2. On the Desktop, hold option key and in the Go menu you’ll see Library.

    3. Inside the Library, delete the Messages folder.

  15. Pennyworth says:

    Works fine, thanks a lot!

  16. hema says:

    I deleted all the history as well as cleared the conversation on my mac and all other devices yet still every time i open the chat all the messages are still there

  17. Perline says:

    I managed to delete off all the data. u got to delete the history in the ichat folder as well as in the messages folder.

  18. Mona says:

    If you delete an iMessage chat on the IPhone, will automatically delete from all other devices?

  19. Jose says:

    This works well, but I also had a subfolder in the ~/Library/Messages folder so I had to modify the command. I also had the ~/Documents/iChats folder which stored a history so I added that as well. My script looks like:

    rm -f -r ~/Library/Messages/*
    rm -f -r ~/Documents/iChats/*

  20. chipchip1971 says:

    Great advice! Worked for me. Love using iMessage on OSX Lion to communicate with my friends on iDevices, including sending and receiving pictures and files.

  21. Leigh says:

    Thanks for the tip Marcus, this works for me.

  22. ebling says:

    Easier way to clear your chat history is to go to the iMessage menu > Edit > clear transcript.

    Or left click your avatar icon in the chat box, (make sure you select the avatar/icon and not the message) and you will also get the option to clear transcript.

    Hope this helps

  23. Martin says:

    hi! i did the terminal thing, but now everytime i close the messages window, all my messages are deleted.. is there any way to fix this?? i tried uninstalling and reinstalling messages app but that didn’t work

  24. Marcus says:

    BTW, thanks for this tip !!!!

  25. Marcus says:

    On my Mac, “Messages” also has a folder in Documents that keeps a record of all my chats. It’s unusual, because the folder is named “iChats” inside all my chats are arranged by dates.

  26. Kr00 says:

    I’m testing Mountain Lion and in the Messages app, when you hover over a conversation with the cursor, a cross appears, allowing you to delete the conversation. Doesn’t this delete the history as well?

    • Kevin says:

      @ Kr00 I don’t think so. I tried that as well for the longest time. It seems that the conversation is closed and deleted. However, when you contact that particular individual again, the conversation history returns. I bet it is a bug.

      On a side note – I also tired to go to “edit” and “clear transcript”. However, I ran into the same results (conversation history returned upon starting a new conversation with the same person).

      I believe this fix is a work-around for the bug.

  27. John says:

    I hope the final version isn’t so buggy, and better yet, I hope it has an option to be silent when a device is active. The worst thing about iMessage for Mac is the constant alerts on all devices, even when they’re charging in another room.

  28. Michael says:

    This, of course, assumes that you can actually get iMessage to work in OS X. So far it only worked for me the first time I used it and even then it didn’t sync with my iPhone.

Leave a Reply

 

Shop on Amazon.com and help support OSXDaily!

Subscribe to OSXDaily

Subscribe to RSS Subscribe to Twitter Feed Follow on Facebook Subscribe to eMail Updates

Tips & Tricks

News

iPhone / iPad

Mac

Troubleshooting

Shop on Amazon to help support this site