Diskzyv0.1
Don't delete by hand

What is ~/Library/Containers on Mac? Can you delete it?

Short answer

Do not delete ~/Library/Containers or empty it. Each folder inside is the private home of one sandboxed app and can hold its settings, databases and documents. The only containers worth removing are those of apps you have already uninstalled.

Where it is

~/Library/Containers

What it is

Apps from the Mac App Store, and many others, run in a sandbox. macOS gives each of them a container: a private folder in ~/Library/Containers that stands in for your home folder. Inside it the app has its own Library, with its own Application Support, Preferences and Caches.

That means a container can hold things you care about. Mail keeps its downloads there, note and to-do apps keep their databases there, and Docker Desktop keeps its whole virtual disk there. Finder shows the folders with the app's name, while Terminal shows the bundle identifier, such as com.apple.Safari.

It grows as your apps store more data, and because a container stays behind when you drag its app to the Trash.

How big it gets

From a few GB to tens of GB, depending on which apps you use. One heavy app, such as Docker Desktop, can account for most of it.

How to shrink it the right way

  1. Run the command below to list the largest containers. It only reads sizes. Terminal may need Full Disk Access to look inside some of them.
  2. For an app you still use, free space from inside the app: clear its cache or delete its downloads there. Do not delete files inside its container by hand.
  3. For an app you have uninstalled, quit anything related to it, then move the container named after that app to the Trash.
  4. Leave containers that start with com.apple alone. They belong to macOS and its built-in apps.
In Terminal
du -sh ~/Library/Containers/* 2>/dev/null | sort -h | tail -20

What happens afterwards

Removing the container of an app you deleted has no further effect. Removing the container of an app you still use resets it to a fresh install and deletes whatever it stored there, which can include data that exists nowhere else.

How Diskzy handles it

Diskzy shows each container and its size on the disk map. When you remove an app with Uninstall, its containers go to the Trash along with the rest of what the app left behind.

Related guides

See where your Mac's space went

Diskzy maps your disk, explains System Data and clears what's safe. Free for 72 hours, then $9 once for 2 Macs.

Try Diskzy for free
Read this in:EnglishEspañolDeutschPortuguêsFrançaisTürkçe日本語