How to show hidden files on Mac
You need to show hidden files on Mac when an instruction sends you to the Library folder or to a settings file whose name starts with a dot. macOS hides them so they don’t get moved or deleted by accident: most are settings of apps and developer tools. This guide shows them in Finder and in Terminal and explains which hidden files are safe to delete and which are not.
How to show hidden files on Mac in Finder
- Open a Finder window with the folder you need. To start from your home folder, choose Go › Home (Shift-Command-H).
- Press Command-Shift-Period (.). Hidden files and folders appear, slightly faded.

- Press Command-Shift-Period again to hide them.
Hidden items stay visible in all Finder windows until you press the keys again. The same keys work in the Open and Save windows of other apps.
Open the hidden Library folder
Your Library folder holds app settings, caches and data, and Finder hides it. To open it once:
- Click the desktop or a Finder window, so Finder is the active app.
- Hold Option and open the Go menu: Library appears in it. Choose it.

You can also choose Go › Go to Folder (Shift-Command-G), type ~/Library and press Return. To keep Library always visible, choose Go › Home, then View › Show View Options, and select Show Library Folder.
List hidden files in Terminal
In Terminal, ls skips files whose names start with a dot. Add -a to list them too. This command shows everything in your home folder, hidden items included, and changes nothing:
ls -a ~
If you haven’t used Terminal before, see how to open Terminal on Mac.
What hidden files are and what not to delete
- Files starting with a dot (
.zshrc,.gitconfig) are settings of Terminal and developer tools. The.sshfolder holds your SSH keys: deleting it can lock you out of servers and Git hosts. - `.DS_Store` files keep how Finder shows a folder: icon positions, sort order. Deleting them is harmless, and Finder creates them again.
- Library holds the data of your apps, from Mail to Messages. Delete only what you know, and only inside cache folders.
Some hidden folders really are big caches you can clear, like those of npm or Gradle: see how to clear npm cache on Mac and how to clear Gradle cache on Mac. For app caches in Library, see how to clear cache on Mac.
Keep your Mac tidy

MacWashing doesn’t show or hide files. If you are looking through Library or hidden folders to free up space, System Junk finds the caches of apps and developer tools there and shows how much each takes, with anything debatable unchecked.
Free trial · macOS 14 or later
Questions and answers
What is the shortcut to show hidden files on Mac?
Command-Shift-Period (.) in a Finder window. Press it again to hide the files.
Why are some files hidden on a Mac?
They are settings and data that apps and macOS need. Hiding them keeps them from being moved or deleted by accident and keeps folders tidy.
Is it safe to leave hidden files visible?
Yes. Showing them changes only what Finder displays. Just be careful not to move or delete them while they are visible.