How to Delete old iMessages

Is there any way to delete iMessages on OS X older than a certain date or amount of time? As in - on iOS you can set it to delete after 30 days or a year, but there seems to be no similar setting on OS X. I don't even care if it's an AppleScript or something I have to run manually every now and then. I just wish there was a way to delete older messages without deleting ALL of my messages.


Any ideas? Thanks!

iMac with Retina 5K display, OS X El Capitan (10.11.3)

Posted on Mar 14, 2016 2:17 PM

Reply
1 reply

Mar 15, 2016 2:47 PM in response to jdavcfy

Ummm,


That's a bit of a puzzler.


iMessages are stored in the three Chat.db items in ~/Library/messages

If you also Save Chats (in the General Section of the Preferences) they are also stored in:-

~/Library/Containers/com.apple.iChat/Data/Library/Messages/Archive by date and time (further subfolders)


Both are used, depending on the type of chat to show the "History" of a chat/conversation if you have dismissed it from view.


In the Main window the Side bar has the list of Chat and Conversations that are open.

Mousing over the list reveals an "x" to the right of the preview text.

This can be used to "hide" that chat to conversation until either they send a new messages or you do.


The File Menu give you the option to Close the Window,

Close Conversation (what I have called "Dismiss" before) or you can

Delete Conversations using CMD and Backspace when the Chat or Conversation is highlighted.


The chat..db items are sql files in effect and cannot be edited with the Standard install items on a Mac.

The chat.db items also have a role in "history" of non iMessages chats that are Saved in the Archive folder.


Individual items can be deleted from Conversation/Chat by highlighting that one item then using the backspace.

From my limited testing a while back it seems items deleted in the Main window are deleted with the app making the "edits" if you like to the Chat.db items and Archive folder.

My testing was limited as I ran out of items I didn't mind losing.


I presume that the app has some way of counting the individual messages with a chat/Conversation.

However how that relates to the chat itself and where it might be in the list at any given moment, as ones with new messages pop to the top, makes me wonder if it is possible to get AppleScript to look inside a window of an open app.


I am not sure what to suggest.





User uploaded file

9:47 pm Tuesday; March 15, 2016


 iMac 2.5Ghz i5 2011 (El Capitan)
 G4/1GhzDual MDD (Leopard 10.5.8)
 MacBookPro 2Gb (Snow Leopard 10.6.8)
 Mac OS X (10.6.8),
 Couple of iPhones and an iPad

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.

How to Delete old iMessages

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