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.
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 conversationschat.db-walandchat.db-shm— write-ahead logs for the databaseAttachments/— the big oneArchive/— manually archived chatsStickerCache/— 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.
- Open Messages.
- From the menu bar, click Messages → Settings.
- Click iMessage tab.
- Check Enable Messages in iCloud.
- 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.
Manually deleting old attachments
If you don’t want to use Messages in iCloud, you can manually clear attachments:
- Quit Messages (Cmd+Q).
- Open Finder, press Cmd+Shift+G.
- Paste
~/Library/Messages/Attachments/. - The folder structure is
[a]/[b]/[hash]/— letters and hashes for organization. - To clear everything: select all, delete. To clear selectively: sort by size or date and delete the largest old folders.
- 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.
Delete attachments from inside Messages
Apple added an attachment manager in Sonoma. To use it:
- Open Messages.
- Click a conversation.
- Click the contact’s name at the top → Info.
- Scroll to Photos, Links, and other media sections.
- 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:
- Quit Messages.
- Open Terminal.
- 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-walandchat.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:
- Quit Messages.
- Delete the contents of
StickerCache. - Empty Trash.
- Reopen Messages — stickers reload as you use them.
Setting up auto-cleanup going forward
Messages has a built-in auto-delete option for old conversations:
- Messages → Settings → General.
- 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:
- Default keeps everything forever. No automatic expiration unless you change the setting.
- Group chats multiply media. Every photo from every member, cached.
- High-resolution media. Modern iPhones send full-resolution photos and 4K videos by default.
- 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.