Sweepfor Mac

Free up storage

How to Clear iMessage's Cache and Attachments on Mac

iMessage on Mac stores every photo, video, and attachment locally — often 10GB+. Here's where it lives and how to clean it without losing chats.

7 min read

iMessage on Mac is a bigger storage problem than people realize. The Messages app keeps a local copy of every photo, video, voice memo, and attachment anyone has ever sent you, and unless you turn on Messages in iCloud with optimization, none of it ever leaves your Mac. I’ve audited Macs where the Messages folder alone hit 50GB.

Here’s where it all lives and how to clean it on macOS Sonoma 14 and Sequoia 15.

Where Messages stores everything on Mac

Two main locations matter:

  • ~/Library/Messages/ — the message database and core data
  • ~/Library/Messages/Attachments/ — every photo, video, voice memo, and file received via iMessage

Subfolders inside Messages:

  • chat.db — the SQLite database of all your conversations
  • chat.db-wal and chat.db-shm — write-ahead logs for the database
  • Attachments/ — the big one
  • Archive/ — manually archived chats
  • StickerCache/ — cached stickers

The Attachments/ folder is organized into a deeply nested structure of letter-prefix subfolders, but the contents are every media file iMessage ever received.

How big can this get?

On a Mac that’s been signed into iMessage for 3+ years with regular friends-and-family use:

  • Light user: 2-5GB
  • Average user: 10-20GB
  • Heavy user with group chats and photo-sharing: 30-50GB+

The Attachments folder is almost always the bulk of it. The database itself rarely exceeds a few hundred MB even on heavy use.

The easy way: Messages in iCloud

Apple’s intended solution is Messages in iCloud, which stores attachments in iCloud and keeps only optimized local copies on your Mac.

  1. Open Messages.
  2. From the menu bar, click Messages → Settings.
  3. Click iMessage tab.
  4. Check Enable Messages in iCloud.
  5. Wait for the initial sync (can take hours on large message histories).

Once enabled, Messages will offload older attachments to iCloud and keep recent ones cached locally. Storage on your Mac drops noticeably.

The catch: this requires sufficient iCloud storage. If your iCloud is full, Messages can’t sync there.

Tip: You can manually trigger a sync once Messages in iCloud is on. Messages → Settings → iMessage → Sync Now.

Manually deleting old attachments

If you don’t want to use Messages in iCloud, you can manually clear attachments:

  1. Quit Messages (Cmd+Q).
  2. Open Finder, press Cmd+Shift+G.
  3. Paste ~/Library/Messages/Attachments/.
  4. The folder structure is [a]/[b]/[hash]/ — letters and hashes for organization.
  5. To clear everything: select all, delete. To clear selectively: sort by size or date and delete the largest old folders.
  6. Empty Trash.

This deletes the local copies of attachments. Conversations remain in your message history, but tapping an old photo or video shows “Image not available” since the file is gone.

If Messages in iCloud is enabled, deleted attachments are still safe in iCloud and can re-download. If not, they’re gone permanently.

Skip the manual huntSweep clears every cache across every app in one pass — Slack, Spotify, Discord, browsers, and the rest. Download Sweep free →

Delete attachments from inside Messages

Apple added an attachment manager in Sonoma. To use it:

  1. Open Messages.
  2. Click a conversation.
  3. Click the contact’s name at the top → Info.
  4. Scroll to Photos, Links, and other media sections.
  5. Tap and hold or right-click a media item → Delete.

This removes individual items from specific conversations. Tedious for clearing 10GB but useful for surgical removal of one big video that’s hogging space.

The chat.db database

The actual message database is at ~/Library/Messages/chat.db. Even on heavy users this rarely exceeds 1GB — text doesn’t take much space. You can vacuum it for a small optimization:

  1. Quit Messages.
  2. Open Terminal.
  3. Run: sqlite3 ~/Library/Messages/chat.db "vacuum;"

This recovers a small amount of space and speeds up the database. Fully safe.

Don’t delete these

While poking around ~/Library/Messages/, leave these alone:

  • chat.db — your actual messages (deleting loses everything)
  • chat.db-wal and chat.db-shm — database operation files

If you really want to nuke iMessage history on this Mac and start fresh, deleting all of ~/Library/Messages/ will do it. Messages will recreate the folder on next launch and resync from iCloud if you have Messages in iCloud enabled. Without iCloud sync, your local history is gone.

What about the StickerCache?

~/Library/Messages/StickerCache/ holds cached sticker assets. Usually small (a few hundred MB), regenerates as needed. Safe to clear if you want every byte:

  1. Quit Messages.
  2. Delete the contents of StickerCache.
  3. Empty Trash.
  4. Reopen Messages — stickers reload as you use them.

There’s a faster waySweep finds and clears caches across every app you use, all at once. Try Sweep free →

Setting up auto-cleanup going forward

Messages has a built-in auto-delete option for old conversations:

  1. Messages → Settings → General.
  2. Keep messages: choose 30 Days, 1 Year, or Forever.

If you change this from Forever to 1 Year, messages older than a year delete automatically (including their attachments). Big space savings on long-time iMessage users.

Be aware: this is permanent. Deleted messages don’t come back even if you change the setting later.

Why Messages grows so fast

A few reasons it gets out of hand:

  1. Default keeps everything forever. No automatic expiration unless you change the setting.
  2. Group chats multiply media. Every photo from every member, cached.
  3. High-resolution media. Modern iPhones send full-resolution photos and 4K videos by default.
  4. No size cap. Messages has no built-in limit on local storage.

A family group chat with regular photo and video sharing can add several GB per year on its own.

When clearing helps

  • Mac storage is tight
  • About This Mac → Storage shows Messages as a top consumer
  • Messages app feels sluggish

When it doesn’t help: sync issues with other Apple devices (those need iCloud troubleshooting), notification problems, message delivery issues.

How often is reasonable

If using Messages in iCloud with optimization: never need to manually clear. iCloud handles it.

If not using iCloud: every 6-12 months for the Attachments folder. Or set the auto-delete option.

If you have 50GB of Messages data and don’t want to lose any of it: Messages in iCloud is the answer.

Worth automating?

Messages is one of the trickier apps to clean automatically because the data overlaps with actual content (your conversations). Sweep handles the obvious cache pieces — StickerCache, temporary attachments, database optimization — without touching your actual message history. For the bigger Attachments folder, manual is more appropriate, since you might want to preview before deleting.

That said, if your Mac is full and Messages is the cause, getting a clear picture of what’s taking space is half the battle. Sweep’s scan tells you exactly how much each app is using before you decide what to clean.

Bottom line

Most of iMessage’s space sits in ~/Library/Messages/Attachments/. The cleanest path is enabling Messages in iCloud — Apple handles the cleanup automatically. The manual path is wiping the Attachments folder, which loses local copies of media in old conversations.

Database, settings, and recent messages stay safe with either approach.

← Back to all guides