ClearDisk
Buy for $10Download ClearDisk
A LITTLE MORE CLARITY

How to show hidden files on Mac, and which ones hold space

Finder hides dot folders and the Library to keep app data out of the way, not because it is small. Three routes reveal them; a scanner shows which ones are worth opening.

1. Toggle hidden files in Finder

In any Finder window, press Shift-Command-Period. Hidden files and folders appear greyed out; press the same keys again to hide them. Apple’s published shortcut list does not include this toggle, but it has been part of Finder since macOS Sierra and works in every current version, including in Open and Save dialogs.

What appears are items whose names begin with a dot, such as .DS_Store files in every folder and, in your home folder, developer folders like .npm, .cache, .docker and .gradle. The dot files scattered through documents are tiny; the dot folders in your home folder are the ones that can hold gigabytes.

2. Open a hidden folder directly

When you know the path, Apple’s Finder guide gives the direct route: choose Go → Go to Folder, or press Shift-Command-G, and type the path. A tilde stands for your home folder, so ~/Library opens your user Library and ~/.npm opens npm’s cache. Press Tab to accept a suggested path and Return to open it.

The Library folder is hidden by a different rule than dot folders: it has no dot but Finder hides it anyway. Holding Option while opening the Go menu adds a Library item, and the Library guide covers what is inside and what to leave alone.

3. List hidden items in Terminal

Terminal shows everything by default. ls -la ~ lists your home folder including dot items, and du -sh ~/.[!.]* 2>/dev/null | sort -h sizes each hidden folder and sorts them smallest to largest. Both commands only read. The Terminal guide covers the rest of the measuring commands.

ls -la ~
du -sh ~/.[!.]* 2>/dev/null | sort -h

4. Which hidden folders hold space

On most Macs the hidden folders that matter fall into three groups. Everything in this list is safe to measure; only some of it is safe to remove, and each group has its own guide.

  • Package caches in your home folder: .npm, .cache (pip, pnpm, yarn and many tools), .cargo, .gradle, .m2. Rebuildable; each manager documents a command to clear it.
  • The user Library: Caches, Containers, Application Support, Developer, Mail and Messages. Review-only unless a guide says otherwise.
  • .docker and virtual machine folders: a single disk image can be tens of gigabytes and shrinks only through the app that owns it.
  • .Trash on each volume: the per-disk Trash. Empty it through Finder rather than deleting inside it.

5. Hide them again, and measure before deleting

Press Shift-Command-Period again when you are done; a Finder full of greyed-out files makes ordinary work slower and accidental deletion easier. Nothing you reveal needs to stay revealed to be measured.

Measure before touching anything: Get Info on a folder, the Terminal commands above, or a disk scanner with Full Disk Access that lists hidden folders with allocated sizes and a label. ClearDisk’s free scan shows dot folders and the Library alongside everything else, and moves what you choose to the Trash first so you can put it back.

References & further reading

These guides combine the linked official guidance with ClearDisk’s documented behavior. Your files and app settings determine the right next step.

FROM A NUMBER TO AN ANSWER

See what’s using
your space.

Explore your Mac with ClearDisk’s free local scanner.
Review the files. Keep the control.

Download free scannermacOS 15+ · version 1.0Cleanup license: $10 once