The Containers folder is taking up space on a Mac: what is safe
· 6 min read
~/Library/Containers is where sandboxed apps keep their data: settings, databases, caches and downloads, one folder per app. It is often one of the largest folders in an account, and that is normal. Do not delete the folder itself. Find the one or two containers that account for most of the size, then shrink them from inside the app that owns them, or remove them if the app is long gone.
What the Containers folder is
Apps from the Mac App Store, and many others, run in a sandbox: each gets a private folder and is kept out of everyone else’s. That private folder is its container. Inside each one is a Data folder laid out like a home folder in miniature, with its own Library, Documents and tmp. What would otherwise be scattered across Application Support, Caches and Preferences lives here instead.
A neighbor works the same way. ~/Library/Group Containers holds data shared between several apps or extensions from one developer. Notes keeps its database and attachments there, Voice Memos keeps its recordings there, and Podcasts keeps downloaded episodes there. Everything below applies to both folders, and each account on the Mac has its own pair.
See which containers are big
In Finder:
- Choose Go, Go to Folder (Shift-Command-G), type
~/Library/Containersand press Return. - Switch to list view with Command-2.
- Choose View, Show View Options (Command-J) and tick Calculate all sizes.
- Click the Size column to sort. Give it a minute, because folder sizes fill in gradually.
Finder shows each container under its app’s name, not its real folder name, so an app and its helpers can look like near-duplicates.
In Terminal, the real names appear, sorted from smallest to largest:
du -sh ~/Library/Containers/* 2>/dev/null | sort -h | tail -15
Run it again with Group\ Containers in place of Containers for the shared ones. If Terminal reports far less than Finder does, it is being kept out. macOS protects containers from other apps, and Terminal needs Full Disk Access to measure them all. Full Disk Access on a Mac explains what that grant covers before you give it.
Match a container to its app
In Terminal the folders are named by bundle identifier, such as com.apple.mail. To find the app behind an identifier:
mdfind "kMDItemCFBundleIdentifier == 'com.example.app'"
It prints where the app is installed. If it prints nothing, no app with that identifier is on the Mac, and the container is a leftover from something you removed. What is this folder on my Mac has more ways to trace a folder to its owner.
What is usually inside the big ones
- Mail. Attachments you have opened are saved to a
Mail Downloadsfolder inside Mail’s container. They are copies; the originals stay with the messages. - Media apps with offline downloads. Podcast episodes, shows saved for a flight, music kept for listening without a connection.
- Chat apps. Years of received photos and videos, stored locally.
- Virtual machines and developer tools. A single disk image file can be most of the folder.
- Notes and Voice Memos, in Group Containers: every attachment and every recording.
- Caches. Each container has its own, at
Data/Library/Caches.
What is safe to delete
Safe: a container whose app is gone. If the mdfind check comes back empty and you recognize the name as something you uninstalled, move the container to the Trash. Dragging an app to the Trash usually leaves its container behind, so a Mac that has been in use for years collects these. Uninstall an app on a Mac completely lists where else leftovers hide.
Safe, with the app quit: the cache folder inside a container. Data/Library/Caches is rebuilt as the app needs it. Expect the app to be slower the next time it opens. Which caches are safe to delete goes through the exceptions.
Better done from inside the app: downloads and stored media. Delete episodes in Podcasts, recordings in Voice Memos, offline downloads in the app that fetched them. The app updates its own records as it deletes. Removing the files underneath leaves it listing things that no longer exist.
A reset, not a cleanup: the whole container of an app you still use. The app starts again as if newly installed. Settings, sign-in and anything stored only on this Mac are gone; data synced to an account returns when you sign in again. macOS makes a fresh, empty container at the next launch. If a reset is what you want, quit the app, move the container to the Trash, and empty the Trash only after the app is working again.
Leave alone: Apple’s own containers, and anything in Group Containers you cannot identify. Group Containers holds data stores, not caches. Removing the Notes group container removes every note stored only on this Mac. macOS refuses to delete some system containers at all.
Never empty the Containers folder wholesale. Every sandboxed app you own would lose its settings at once.
Why the numbers do not always add up
Disk images inside containers are often sparse files: they claim a maximum size but occupy only what has been written to them. Finder’s Get Info shows both figures, and the one labeled “on disk” is the one that counts. That is why removing a container sometimes returns much less space than its listed size. Emptied the Trash but the Mac got no space back covers the other causes.
A second opinion before you delete
Crumb is a menu bar disk cleaner whose audit is read-only and free. It covers the whole Mac, not only the home folder, and breaks System Data into its parts, so you can see whether Containers is really your problem. The paid tools are the ones that act. Uninstall removes an app plus every leftover, which is the tidy way to deal with a container whose app you no longer want. Ask Crumb lets you point at an item and get an explanation of what it is, whether it regenerates and what breaks if it is gone, followed by a proposed plan. Nothing is deleted until you approve the plan.
The audit and one full cleanup are free for good; $9 once unlocks the rest on up to two Macs. Crumb does not recover deleted files, which is one more reason to use the Trash and not rm when you work by hand.
Questions
Can I move the Containers folder to an external drive? Not in any supported way. Apps expect their container at a fixed place on the startup disk. Move the large contents instead, where the app offers a setting for its library or download location.
Why did a container come back after I deleted it? The app is still installed and was opened, or one of its background helpers ran. macOS creates the container again on demand. An empty one takes almost no space.
Is the Containers folder part of System Data? Mostly, yes. The Storage screen files the bulk of the Library folder under System Data, containers included, and gives only a few apps such as Mail and Messages their own lines. What System Data is on a Mac breaks the category down.