The invisible layer: hidden files on your Mac and what they do
Your Mac has thousands of files you've never seen. They don't appear in Finder. They don't show up when you browse your home folder. But they're there — configuration files, caches, system databases, developer dotfiles — and some of them are surprisingly large.
Here's how to see them, what they are, and which ones you should absolutely leave alone.
How to show hidden files in Finder
The keyboard shortcut:
Cmd + Shift + . (period)
Press it in any Finder window and hidden files appear, slightly grayed out. Press it again to hide them. This is a toggle — it stays active across folders until you press it again.
That's it. No Terminal required for just looking.
Why files are hidden
macOS hides files for two reasons:
- System protection. Files that macOS needs to function — bootloader data, system caches, kernel extensions — are hidden so you don't accidentally delete them.
- Convention. In Unix (which macOS is built on), any file or folder starting with a dot (
.) is hidden by default. Developers use this for configuration files:.zshrc,.gitignore,.env,.ssh.
Hidden files you'll see (and what they are)
When you reveal hidden files in your home folder, you'll see a collection of dot-files and dot-folders. Here are the common ones:
| File/Folder | What it is | Safe to delete? |
|---|---|---|
.zshrc | Your shell configuration (PATH, aliases, etc.) | No — it configures your Terminal |
.ssh | SSH keys for connecting to servers and GitHub | No — deleting this locks you out of servers |
.gitconfig | Your Git settings (name, email, aliases) | No — your Git setup breaks |
.npm | npm's cache and configuration | Cache inside: yes. Config files: no. |
.docker | Docker configuration | No — Docker settings live here |
.Trash | The Trash folder for your disk | Empty it through Finder, not manually |
.DS_Store | Finder's folder view preferences (per folder) | Yes — Finder recreates them |
.localized | Empty file that tells macOS to translate folder names | Yes, but no space saved |
The Library folder — hidden but important
Your ~/Library folder isn't technically a dot-file, but macOS hides it from Finder by default. It's where apps store their data, preferences, caches, and support files. To access it:
- In Finder: hold Option and click the Go menu — Library appears in the list
- Or use Go → Go to Folder and type
~/Library
The biggest folders inside Library are usually Caches (app caches, often 5–20 GB), Application Support (app data), and Developer (Xcode data, if you develop). These are the same folders that contribute to the "System Data" mystery in storage settings.
What you should never touch
Do not delete, rename, or move:
.ssh— your server access keys live here.zshrcor.bash_profile— your Terminal configuration- Anything under
/Systemor/private— macOS system files /usr,/bin,/sbin— system executables- Any hidden file you don't recognize — when in doubt, leave it
Hidden files that waste space
Some hidden files are worth cleaning up:
- .DS_Store files. macOS creates one in every folder you open in Finder. They're tiny (a few KB each), but they clutter Git repos. Not worth manually deleting for space.
- Developer caches.
.npm,.gradle,.cargo,.gem— these can be multi-gigabyte. See our developer caches guide for specifics. - Old app data. If you deleted an app but its dot-folder is still in your home directory, that's waste. Check by name — if you don't have the app anymore, the config folder can go.
See what's really using your disk
Gigatidy looks at everything on your Mac — visible and hidden — and explains what every gigabyte is. No guessing, no risk of deleting the wrong thing.
Meet Gigatidy →FAQ
Will showing hidden files slow down my Mac?
No. Toggling hidden file visibility with Cmd+Shift+. is purely a display setting in Finder. It doesn't change anything about the files themselves or how macOS runs.
Why does macOS hide the Library folder?
To prevent accidental damage. The Library folder contains app preferences, caches, and data that apps depend on. Deleting or moving the wrong file can break apps or lose data. Apple hides it by default because most users never need to access it directly.
Can I permanently show hidden files in Finder?
The Cmd+Shift+. shortcut toggles visibility and stays on until you press it again — even across Finder restarts. There's no separate "permanent" setting needed. If you want hidden files always visible, just press the shortcut once and leave it.