What is ~/Library/Containers, and is it safe to delete?

~/Library/Containers holds the private data of sandboxed apps, one folder per app, and it can include your documents, mail and settings, so it is not safe to clear in bulk.

Shiva ChandraMaker of Clean House · · 2 min read
Short answer

Containers is where sandboxed apps keep their own data: settings, databases, downloads and caches. Each folder is named after an app's bundle ID. Because it mixes rebuildable files with data you care about, the verdict is Look first. Check one app at a time and use that app's own storage tools where they exist.

Path
~/Library/Containers
What it is
A private data folder for each sandboxed app, named by bundle ID such as com.apple.mail
Typical size
Small for most; very large for Docker, Mail and a few others
Made by
Mac App Store apps, Apple apps and other sandboxed apps
Safe to delete?
Look first Judge each app folder on its own; never clear the whole folder.
Comes back?
Only the cache parts. Settings and data do not come back.

What is in ~/Library/Containers?

Sandboxed apps are limited to their own space, and that space is a container. Inside you will find a Data folder with a mini home folder: its own Library, Documents and Caches. Some well-known containers are Mail (com.apple.mail), Docker Desktop (com.docker.docker) and media analysis for Photos (com.apple.mediaanalysisd).

Is it safe to delete Containers?

Not in bulk. A container can hold a Mail attachment copy, a Docker virtual disk with every image and volume you have, or an app's only copy of its settings. Removing a whole container resets the app and may lose data. Inside a container, the Data/Library/Caches folder is the part that usually rebuilds.

If the app is already uninstalled, its container is a leftover and is reasonable to remove once you have looked inside.

How do I find what is big?

  1. Quit the app you are checking.
  2. In Finder, choose Go, then Go to Folder, and enter ~/Library/Containers.
  3. Use list view with Calculate All Sizes, sorted by Size.
  4. Open the largest container, then Data, and look at what is there before deciding.
For Docker, use Docker's own cleanup commands or settings rather than deleting its disk file, which would remove every image and volume.

How Clean House handles it

Clean House uses the bundle ID to name the real app and says whether it is installed. For containers it recognizes, such as Mail's attachment copies, the Why card explains what comes back. Containers that hold app data are marked Look first or Keep, and Peek lets you see inside before you decide.

Questions

What is the Containers folder on a Mac?

It is the private storage area for sandboxed apps. Each app gets one folder, named by its bundle ID, for its settings, data and caches.

Can I delete a container for an app I uninstalled?

Usually yes, since it is a leftover. Look inside first in case it holds something you want.

Why is a container so big?

Docker Desktop, Mail and some media apps store large files there. Use the app's own tools to reduce them.

Sources

  1. Apple Support: Free up storage space on Mac