Free up storage
How to Find Hidden Files on Mac (and What's Worth Looking At)
Show every hidden file on your Mac, understand what each type is for, and identify which hidden files are safe to clean up.
By default, macOS hides a huge portion of your filesystem. Files starting with a dot (.), the ~/Library folder, system directories, and various metadata files all stay invisible until you ask to see them. There are good reasons for this — most hidden files are infrastructure, not content — but knowing how to peek behind the curtain matters for storage cleanup, troubleshooting, and just understanding your Mac better.
This guide covers every reliable way to surface hidden files, what categories of hidden file exist, and which ones are worth your attention.
The keyboard shortcut everyone should know
In any Finder window, press Cmd+Shift+. (period). Hidden files and folders fade in, shown semi-transparent so you can tell them apart from regular files. Press the shortcut again to hide them.
This works in Open and Save dialogs too, which is sometimes the only way to navigate to a hidden folder when an app needs you to pick a path.
Showing hidden files permanently
If you want hidden files always visible, use the defaults command:
defaults write com.apple.Finder AppleShowAllFiles true
killall Finder
To revert:
defaults write com.apple.Finder AppleShowAllFiles false
killall Finder
Most people prefer the toggle shortcut. Permanent visibility makes Finder windows visually noisier without much benefit, since the hidden files are mostly infrastructure you don’t interact with.
What “hidden” actually means
macOS hides files via two different mechanisms.
Dot prefix. Any file or folder whose name starts with . is hidden in Finder by convention. Examples: .DS_Store, .gitignore, .bash_profile, .zshrc. This is a Unix convention macOS inherited.
Hidden flag. Files can have a chflags hidden flag set. This is how Apple hides folders like /usr, /bin, /etc, and /private. Even without a dot prefix, they don’t show in Finder.
Both mechanisms are independent. A file can have a dot AND the hidden flag, just one, or neither.
To list all hidden items in a folder via Terminal:
ls -la
The -a flag shows everything including dotfiles. -l gives the long format with permissions and sizes.
For just dotfiles in your home folder:
ls -d ~/.??*
The major hidden directories
Here’s what each common hidden location holds.
~/Library — Your user’s app data, caches, preferences, application support, fonts, mail, and dozens of other categories. Probably 20-100GB on a typical Mac. This is where almost all storage cleanup happens.
/System — macOS itself. Read-only on modern macOS due to System Integrity Protection. Don’t touch.
/Library — System-wide app data and configuration. Apps installed via .pkg often write here. Some cleanup possible, but most is system-managed.
/private — Where macOS keeps /var, /etc, /tmp. System infrastructure. Don’t touch.
/usr — Unix system binaries. Some users add things to /usr/local for command-line tools. Otherwise system-managed.
/bin, /sbin, /opt — Standard Unix locations. System-managed.
~/.Trash — Your Trash. The hidden version of the Trash icon in the dock.
Per-app config dotfiles in your home folder — .zshrc, .bash_profile, .npmrc, .gitconfig, .ssh, .vscode, etc. Small but important if you’re a developer.
Hidden files worth checking for storage
Most of your storage problem lives in ~/Library. Hidden by default but accessible via Cmd+Shift+G in Finder, then typing ~/Library.
Inside, the heavy hitters:
~/Library/Caches — App caches. Should be clearable; macOS regenerates them.
~/Library/Containers — Sandboxed app data. Each app’s container can hold gigabytes.
~/Library/Application Support — Non-sandboxed app data. Adobe, Google, Microsoft apps store huge amounts here.
~/Library/Logs — Log files. Usually small but can grow if an app logs verbosely.
~/Library/Mobile Documents — iCloud Drive contents in their raw form. Don’t manually delete from here — use Finder’s iCloud Drive sidebar entry instead.
~/Library/Mail — Apple Mail’s local data. Heavy users see 5-30GB here.
~/Library/Messages — Messages app history. Often 1-5GB.
To see top-level sizes in Library:
du -sh ~/Library/* 2>/dev/null | sort -hr | head -20
Top 20 largest folders inside Library, sorted big-to-small.
.DS_Store files everywhere
.DS_Store is a hidden file Finder creates in every folder you view. It stores Finder-specific metadata: window position, view type, sort order, custom icons. They’re tiny — usually a few KB each — but there can be thousands.
To find them:
find ~ -name ".DS_Store" 2>/dev/null | wc -l
That counts them. On older Macs, expect anywhere from 1,000 to 50,000.
To delete them all:
find ~ -name ".DS_Store" -delete 2>/dev/null
Finder will recreate them when you visit folders, so this is more of a “reset” than a permanent fix. The main reason to do it: when zipping folders or sharing them with non-Mac users, .DS_Store files create noise.
._ AppleDouble files
When you copy files to non-Mac filesystems (USB drives formatted FAT32 or exFAT, network shares without proper Mac support), macOS creates ._ companion files to preserve metadata. They appear in pairs: myfile.txt and ._myfile.txt.
On a Mac-native disk these usually don’t appear, but if you’ve copied things back from external drives, you may have a bunch.
To find them:
find ~ -name "._*" 2>/dev/null
To delete:
find ~ -name "._*" -delete 2>/dev/null
They’re regenerable — macOS makes new ones whenever you copy to non-HFS/APFS volumes.
Spotlight metadata stores
The hidden .Spotlight-V100 directory at the root of every volume contains Spotlight’s index. You can’t see it in Finder normally. Disk Utility shows it via df -i or similar utilities.
If Spotlight starts behaving weirdly (search returning nothing, or returning everything), you can rebuild the index by deleting and forcing a rebuild:
sudo mdutil -E /
That asks Spotlight to erase and rebuild. Takes hours on a full drive but can fix bizarre indexing problems.
Trashes folders on external drives
When you delete a file from an external drive, it goes to a hidden .Trashes folder on that drive, not your main Trash. Hidden by default. To see it:
In Finder, navigate to the external drive. Press Cmd+Shift+. to show hidden items. The .Trashes folder appears.
These accumulate on long-connected externals. Empty the external’s Trash by emptying your main Trash while the drive is connected — macOS handles both.
Hidden Application Support cleanup
The single biggest win in hidden-file cleanup is checking ~/Library/Application Support for folders belonging to apps you no longer use.
Walk through it:
- Press
Cmd+Shift+Gin Finder, type~/Library/Application Support - Switch to List View, sort by Size (turn on “Calculate all sizes” via Cmd+J first)
- For each top-level folder over 100MB: do you still use this app?
- If no, the folder is safe to delete
App developers don’t always clean up after themselves when their apps are removed, so this folder accumulates orphan data over years.
What never to touch
/System is read-only and protected. You can’t delete from it without disabling System Integrity Protection, which you should not do.
/usr/bin, /usr/sbin — Unix essentials. Don’t touch.
~/.Trash — Don’t manually delete files here outside the Trash UI. Just empty Trash normally.
.git folders — Git repository data. Delete this and you’ve nuked your version control history. Only delete if you’re sure the repository is dead.
~/.ssh — Your SSH keys. Critical for any server access. Back this up; never lightly delete.
Hidden files in app bundles — Apps store internal data inside their .app bundles. Don’t go editing.
Summary
Hidden files on macOS fall into a few categories: system infrastructure (don’t touch), user app data (where most cleanup wins are), Finder metadata (regenerable noise), and Unix conventions (config files, mostly small but important).
The Cmd+Shift+. shortcut is your one-button reveal. ~/Library is where the storage gold is. Spotlight’s mdfind and Terminal’s find work on hidden files as well as visible ones.
For most cleanup, you don’t need to manually browse hidden files at all. A cleaning tool sees them and can flag the categories worth removing, leaving the system stuff alone. The hidden-file world is large, and triaging it manually is a multi-hour project. Knowing the structure helps you understand what cleaning tools do, even if you don’t do it yourself.