Is it safe to delete ~/Library/Containers on Mac?

Do not delete~/Library/Containers

No. Containers holds the data of sandboxed apps. What is inside, what deleting one costs, how to measure it and how to shrink it the safe way.

Updated 16 November 2026 · 4 min read

Verdict: Do not delete. ~/Library/Containers holds a private home folder for every sandboxed app on your Mac, with that app's documents, settings, caches and databases inside, so deleting it, or one app's container, resets that app and can destroy data that exists nowhere else. Shrink it from inside each app instead, or delete an app first and only then its leftover container.

It often looks alarming in a disk map, but the size almost always comes from one or two apps you can deal with directly.

What lives in ~/Library/Containers

Apple's macOS Library Directory Details describes this folder as containing "the home directories for any sandboxed apps". Apple's developer guide to accessing files from the macOS App Sandbox adds that macOS creates the container the first time a sandboxed app launches, and that the app has full read and write access to it.

Sandboxed apps include most apps from the App Store and many apps that come with macOS. Each container is named after the app's bundle ID, such as com.example.app. Inside a Data folder, the app gets its own copy of a home folder layout, including its own Library with Caches, Application Support and Preferences. That means one container can hold:

  • the app's settings and sign-in state
  • its database or library, such as notes, mail, chats or media
  • offline downloads and documents saved inside the app
  • its caches, which are the only part that rebuilds

Docker Desktop also keeps its entire Linux disk image here, in com.docker.docker. That single file can be the largest thing in the folder.

What happens if you delete it

If you delete a container:

  • The app opens as if it were brand new. Settings and sign-ins are gone.
  • Anything the app syncs to its servers or to iCloud usually comes back once you sign in.
  • Anything kept only on this Mac is gone for good: local-only notes or projects, unsynced drafts, offline media, chat history that isn't stored online.
  • If the app was open, it can crash or save into a half-empty folder.

Deleting the whole Containers folder does this to every sandboxed app at once, including Apple's.

How to check its size safely

In Terminal:

du -sh ~/Library/Containers

This only reads, but macOS protects other apps' data. On macOS 14 Sonoma and later, macOS may ask whether Terminal can access data from other apps, or du may print "Operation not permitted" lines and report a total that is too low. You can allow access, or give Terminal Full Disk Access in System Settings > Privacy & Security > Full Disk Access, but you don't need to. To find the biggest containers:

du -sh ~/Library/Containers/* 2>/dev/null | sort -h | tail -10

Finder is the simpler route:

  1. Choose Go > Go to Folder, type ~/Library/Containers and press Return.
  2. Choose View > as List, then View > Show View Options, and tick Calculate all sizes.
  3. Click the Size column. Select a container and choose File > Get Info for its exact size.

The safest way to get the space back

  1. Find the one or two biggest containers and work out which apps they belong to.
  2. If you use the app, look in its own settings for storage, downloads, offline files or cache options, and clear those. That removes the bulk without touching your data.
  3. If it is Docker Desktop, use Docker's own prune commands, not Finder. See is it safe to delete Docker's data.
  4. If you no longer use the app, delete the app first. Then, if its container is still there, move the container to the Bin.
  5. Empty the Bin a few days later, once you are sure nothing needed it. As Apple's Free up storage space on Mac notes, the space only comes back then.

Warning: don't use rm -rf on anything in this folder. A mistyped bundle ID can wipe the wrong app's data, and the Bin is your only safety net.

What never to touch

  • The Containers folder itself.
  • Apple's containers, the ones starting with com.apple.. They belong to built-in apps and services.
  • Containers of apps you use. Clear space from inside the app.
  • Any container whose app is open.
  • Files inside a container, picked by hand. The app expects its folder to be complete.

The Group Containers folder next door holds data shared between related apps and needs the same care. For non-sandboxed apps, the equivalent is Application Support. If Docker is the culprit, our guide to Docker Desktop disk space walks through every prune step.

How Headroom helps

Headroom never cleans anything in Containers. Its Space map shows the folder with the note "Data for sandboxed apps" and lists each container by size, so you can see which app is using the room and open it with Show in Finder. Anything macOS keeps private is shown as locked rather than guessed. Looking is free and read-only. When you want to clear what genuinely rebuilds elsewhere, Clean handles that, and the $19 one-time licence clears what you tick. See the disk map or download Headroom.

Questions

What is the Containers folder on a Mac?

It holds a private home folder for each sandboxed app, which includes most App Store apps and many of Apple's own. macOS creates one when the app first opens, and the app keeps its documents, settings and caches inside.

Can I delete a container for an app I have uninstalled?

Usually, yes. Make sure the app is really gone, check the folder's name matches it, and move the folder to the Bin rather than deleting it outright. Leave Apple's containers alone.

Why does Terminal say Operation not permitted in Containers?

macOS protects other apps' data. Terminal needs Full Disk Access, or your permission when macOS asks, before it can read another app's container. Finder's Get Info is a simpler way to see the size.

Why is my Containers folder so big?

Usually one or two apps: an app that stores media or offline files, a mail or chat app, or Docker Desktop, which keeps its whole Linux disk image in its container.