Skip to content

Why du shows nothing, or Operation not permitted, for Library folders on a Mac

Without Full Disk Access, Terminal under-reports your Library. On our Mac du saw 120 KB of Group Containers where there were 4.5 GB. How to get true sizes.

5 min read

Why does du say Operation not permitted?

macOS protects a set of folders, among them Mail, Messages, Safari, Group Containers and much of Library, from any app without Full Disk Access. Terminal is an app like any other. du cannot open what it is not allowed into, so it reports what it can see and prints errors for the rest, or, with errors hidden, quietly shows small numbers.

FolderTerminal without Full Disk AccessReal size
Group Containers120 KB4.5 GB
Biomenothing357 MB
DuetExpertCenternothing280 MB
Daemon Containersnothing183 MB
Mailnothing157 MB
IntelligencePlatformnothing108 MB
Trialnothing101 MB

Same Mac, same minute: the left column is du -sh from Terminal, the right is Free Mac's scan with Full Disk Access.

How do I give Terminal Full Disk Access?

  1. Open System Settings, Privacy & Security, Full Disk Access.
  2. Turn on Terminal (or iTerm, Ghostty, or the terminal inside your editor; the permission belongs to the app you type in).
  3. Quit and reopen the terminal app. The permission only applies to new sessions.
du -sh ~/Library/* 2>&1 | grep -c 'Operation not permitted'

Run that before and after: the count should drop to zero, or close to it. Some folders stay protected even then.

Should I leave Terminal with Full Disk Access?

It is a broad permission: anything you run in that terminal can read your mail and messages. Many people turn it on to measure, then off again. Measuring with an app that only reads sizes is the other way round it.

Find what is left in one look

Free Mac measures protected folders with the access you grant it, shows each one to scale, and only moves what you pick to the Trash. See Finder size vs Terminal size and Group Containers.

Related: DuetExpertCenter and Daemon Containers.

Common questions

Why does du say Operation not permitted on my Mac?

macOS protects some folders from apps without Full Disk Access, and Terminal is one of those apps until you allow it.

How do I give Terminal Full Disk Access?

System Settings, Privacy & Security, Full Disk Access, turn on your terminal app, then quit and reopen it.

Why is du smaller than About This Mac's storage?

du skips folders it is not allowed to read and does not count purgeable space or snapshots. Protected Library folders alone were gigabytes on our Mac.

Read next