First of all, you need to figure out where the deleted iMessages stored. By navigating to the ~/Library/Messages folder on your Mac, you will see the Archive folder, Attachments folder, and a file named 'chat. db'.