24

I wonder what's the purpose of ~/Library/Containers?

I know that under ~/Library/Preferences you can find user specific app and system configuration plists. But I can also find them in ~/Library/Containers.

What kind of configuration is stored there?

29

~/Library/Containers contain the home directories of sandboxed apps.

Sandboxed apps are for example the apps you download from the Mac App Store. Sandboxing means that they are "isolated" from the rest of the system, so that a single app is not able to do unjust harm to other parts of the system.

Therefore sandboxed apps are normally not allowed to just write to any file system path they want. In order to support writing to standard paths without having to rewrite the apps, the system will create a Container folder that the sandboxed app can write into. The sandboxed app thinks it is writing into a system folder for preferences for example - but the system rewrites the path so that it ends up in the Container folder instead.

For example many apps wrote their data to ~/Library/Application Support/. A sandboxed app cannot do that - and the data is instead written beneath the ~/Library/Containers/ path for that app.

  • 1
    Is it safe to simply delete this directory? It got pretty big (~11GB) on my home. – Dror Feb 7 '18 at 13:45
  • 4
    No, that’s not safe - unless you don’t mind loosing all the settings and data that is stored there. – jksoegaard Feb 7 '18 at 17:48

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .