Messages on a Mac: how much space chats and attachments take, and how to trim them safely

By the Zofle team · 10 November 2026 · 5 min read

Diagram showing chat.db text database versus the Attachments folder, and the safe cleanup steps in System Settings.

If you check Storage on your Mac and wonder why System Data or Messages is eating 30 GB or 50 GB, the culprit is almost never your text messages. Text is tiny. A chat thread with 50,000 text messages takes less than 20 megabytes.

The real storage hog is attachments: 4K video clips shot on an iPhone, full-resolution photos, voice memos, screen recordings, PDFs and memes sent over years. Here is how macOS stores your Messages, why Terminal can't easily see them, and how to reclaim your gigabytes without losing your conversations.

Inside ~/Library/Messages: text vs attachments

Your Mac stores message data in your home folder under ~/Library/Messages. It is split into two distinct parts:

text
~/Library/Messages/
├── chat.db                # SQLite database (text, timestamps, contact IDs)
├── chat.db-wal            # Write-Ahead Log for active database writes
├── chat.db-shm            # Shared memory index for SQLite
└── Attachments/           # Nested folders holding the raw media files
    ├── 00/ ...
    ├── a1/ ...
    └── ff/ ...

Here is a worked example of how 31.25 GB might break down on a Mac with several years of synced iMessage history. It is not a reading from your Mac; use the commands above for your own totals:

ComponentWhat it storesWorked exampleShare of total
chat.db (+ WAL / shm)Text messages, read receipts, sender info48.2 MB0.15%
Attachments/ (Photos)HEIC, JPEG, PNG screenshots and camera photos11.4 GB36.5%
Attachments/ (Videos)4K/1080p QuickTime MOV and MP4 clips16.8 GB53.8%
Attachments/ (Audio & Docs)Voice memos, PDFs, archives, stickers3.0 GB9.5%
Total Messages FolderComplete message history and media31.25 GB100%

As the table shows, 99.8% of the space is consumed by media attachments, not the text messages. Deleting text conversations without removing attachments does almost nothing for your disk.

Why Terminal says 'Operation not permitted'

If you try to run 'ls -la ~/Library/Messages' or 'du -sh ~/Library/Messages' in Terminal, macOS will usually block you with 'Operation not permitted'. That is by design.

Apple protects the Messages directory using Transparency, Consent, and Control (TCC) to stop third-party scripts from reading private conversations. You do not need to grant Terminal Full Disk Access to clean it up. macOS provides a dedicated, safe visual inspection tool inside System Settings.

Step 1: The official review list in System Settings

This is the safest way to delete large videos and photos while keeping your message text intact:

text
1. Open Apple menu > System Settings > General > Storage.
2. Scroll down to the categories list and find 'Messages'.
3. Click the (i) info icon beside Messages.
4. You will see a list of attachments sorted by size, largest first.
5. Select large video files you already saved or no longer need, then click Delete.

For example, if 14 reviewed video attachments total 12.6 GB, deleting them with the Storage review tool can reclaim that space without deleting the surrounding text history. Confirm your own selected total before clicking Delete.

Step 2: The 'Keep Messages' setting and iCloud sync

If you never want Messages to build up 30+ GB in the background again, change the retention setting:

text
1. Open the Messages app on your Mac.
2. In the menu bar, choose Messages > Settings (or press Cmd+,).
3. In the General tab, look for 'Keep messages'.
4. Default is 'Forever'. You can switch to '1 Year' or '30 Days'.

Important warning about iCloud sync: If you have 'Messages in iCloud' turned on (System Settings > Apple Account > iCloud > Messages), deleting a message or attachment on your Mac deletes it from your iPhone, iPad, and iCloud too. It does not stay on your phone. If someone sent you photos you want to keep forever, save them to your Photos library or external drive before deleting.

What NOT to do

Here are three common mistakes that cause corrupted message history:

  • Never delete chat.db manually: Deleting or renaming the SQLite database while Messages is running can corrupt the local store, break iCloud sync, and cause the app to crash on launch.
  • Do not delete raw files inside Attachments in Finder: If you manually delete files from the subfolders, chat.db still expects them. Your conversations will display empty question-mark icons and broken thumbnails forever.
  • Do not turn off Messages in iCloud just to clear Mac space: Disabling sync makes your Mac store messages independently, doubling the sync load when re-enabled. Use the Storage review tool instead.

For more details on how macOS classifies files and how System Data behaves, read our related guide: macOS System Data: what uses it, why it grows, and how to get the space back.

Want to see what else is eating your Mac's storage without risking your files? Zofle inspects developer caches, old build outputs, uninstalled app leftovers, and big files safely.

Download Zofle for Mac

Sources: Apple Support, 'Manage storage used by Messages on Mac' (syspf5a64a78); Apple Support, 'Keep your messages up to date with iCloud' (102634); Apple Developer Documentation, 'App Sandbox and TCC controls'. Checked November 2026.

Zofle Pro news

People signing up now will get Zofle Pro, with more features, for free when we launch it.

One email when it's ready. No spam, ever.