In the Messages app, I want to delete and report junk on all messages that contain any text from a list of specific texts, in my case political ones, asking for contributions.
I have found useful scripts calling sqlite3 in an SQL query on Apple’s chat.db
file, and then calling regex to find the text of message text, as discussed in Accessing Messages App Sqlite database.
Now, I would like to:
-
Identify the text in Messages’ data, using those chat.db file SQL queries
-
Create a list of those text messages in Messages’s database of active messages
-
Loop through the list of those messages
-
Delete each message in that loop that contain specific texts from that list.
I am at a lost on how to accomplish this task, and would welcome any insight.