Free up storage
How to Find and Delete Empty Folders on Mac
Find every empty folder on your Mac with Terminal, Smart Folders, and Finder tricks. Clear out the directory cruft left behind by old apps and downloads.
Empty folders don’t take much disk space, but they make your file system feel cluttered. Worse, they’re usually evidence of something else — uninstalled apps that left their support folders behind, downloads you extracted and deleted but kept the wrapper, sync clients that created directory trees and never put anything in them.
Cleaning out empty folders won’t free much storage. The reason to do it is navigation. A Documents folder with 200 real folders and 60 empty ones is harder to use than a Documents folder with 200 real folders. Here’s every way to find them on macOS.
The find command — the only reliable method
Finder doesn’t have a built-in “show empty folders” search. The empty-folder hunt happens in Terminal.
Open Terminal and run:
find ~ -type d -empty 2>/dev/null
That lists every empty folder in your home directory. Breakdown:
~— your home folder (use/for the whole disk)-type d— directories only-empty— match if empty2>/dev/null— silence permission errors
To count them:
find ~ -type d -empty 2>/dev/null | wc -l
On most Macs you’ll see somewhere between 50 and 5,000 empty folders depending on how many apps you’ve installed and removed over the years.
find means truly empty — zero items, including hidden ones. A folder containing only a .DS_Store file is NOT empty by this definition.Including folders that only contain .DS_Store
.DS_Store files are macOS’s hidden Finder metadata files. They get created the moment you view a folder in Finder, even one you didn’t change. Many “empty” folders technically contain a .DS_Store and nothing else.
To find folders with only .DS_Store inside:
find ~ -type d -exec sh -c '[ "$(ls -A "$1")" = ".DS_Store" ]' _ {} \; -print 2>/dev/null
Or with a slight tweak, find folders with one or zero items where any items are hidden:
find ~ -type d \( -empty -o -exec test "$(ls -A {} | wc -l)" -le 1 \; \) 2>/dev/null
Both are slow because they evaluate every folder. Be patient on a packed drive.
Deleting empty folders safely
Once you have a list, deletion in bulk is a one-liner. The -delete flag tells find to remove what it matches:
find ~/Documents -type d -empty -delete 2>/dev/null
That deletes every empty folder under ~/Documents. Limit to specific paths — never run -delete on ~ or / without thinking through what could go wrong.
For empty folders that are empty except for a .DS_Store:
find ~/Documents -type d -exec sh -c '[ "$(ls -A "$1")" = ".DS_Store" ] && rm -rf "$1"' _ {} \; 2>/dev/null
That’s destructive — it removes the .DS_Store and the folder together. Test on a non-critical path first.
Where empty folders pile up
Most empty folders cluster in predictable locations.
~/Library/Application Support — When you uninstall an app by dragging it to Trash, the support folder usually stays. Sometimes the app’s nested folders get cleaned but the parent stays as an empty husk. Folders for apps you don’t recognize, sitting empty, are safe to delete.
~/Library/Containers — Same story. Deleted apps leave container folders behind. Most of these are empty after a year.
~/Documents — From extracting archives. You unzip a file, take what you wanted, delete the rest, and the empty container folder sticks around.
~/Downloads — Same as Documents. Multi-folder downloads get pruned to the relevant files but the directory tree remains.
~/Library/Logs — Some apps create log subfolders by date. Days with no log activity become empty folders.
iCloud Drive folders — When you delete files synced from another device, the parent folder may become empty. Removing it on one Mac removes it everywhere — be deliberate.
Dropbox/Google Drive/OneDrive — Same caveat as iCloud. Sync clients propagate deletions.
Visualizing empty folders before you delete
If you want to look before you delete, the simple list output is hard to scan. Pipe it through a tree-like view:
find ~ -type d -empty 2>/dev/null | sort | sed 's|[^/]*/| |g'
That indents folders by depth, so you can see structure.
For a real tree view, install the tree utility via Homebrew:
brew install tree
tree ~/Documents -d --matchdirs -P "" 2>/dev/null
That shows just empty folders within Documents.
Or in Finder, the built-in workaround: Cmd+I (Get Info) on any folder shows item count. Sort by item count? Finder doesn’t let you. But you can use a Smart Folder for “0 items” if you build one creatively.
Smart Folder approximation
You can’t perfectly find empty folders in Finder, but here’s a near-miss approach.
Create a new Smart Folder. Set Kind = Folder. Click + and add a second criterion using “Other…” Search for “size” and pick “File Size.” Set “is less than” 1 byte.
This isn’t reliable — folder sizes in Finder are sums of contents, and “0 bytes” can mean truly empty or a folder with only metadata files. But it gets you close enough to spot the obvious cases.
For real precision, fall back to Terminal.
Folders that look empty but aren’t
Some folders display as empty but have content macOS hides.
Hidden files starting with . — Things like .git, .env, .DS_Store. Press Cmd+Shift+. in Finder to toggle hidden file visibility.
Hardlinks — Time Machine and some backup tools use hardlinks heavily. A folder may show 50 items in Terminal and 0 in Finder if Finder filters them out.
Resource forks — Old Mac files may have data in the resource fork that doesn’t appear as a separate item. Mostly a non-issue on modern macOS.
Permission-restricted contents — A folder you can list but not see into. find will still see contents if running as your user; sudo lets you see more.
If find says a folder is empty and Finder also shows zero items with hidden files visible, it’s truly empty.
Why this happens — and a tiny prevention tip
Empty folders are mostly created by software that doesn’t clean up after itself. Drag-and-drop uninstall is the classic example: macOS doesn’t remove an app’s library data when you trash the app. Specialized uninstaller tools handle this; manual deletion doesn’t.
For your own organization, an occasional empty-folder sweep keeps things tidy. There’s no harm in leaving them — they don’t slow down anything — but they make your folders harder to navigate.
If you’d rather not run Terminal commands periodically, a cleaning tool can include empty-folder sweeping as part of broader cleanup. The same scan that catches old caches and forgotten downloads can catch the empty wrappers around them.
A safety word
The -delete flag is destructive and silent. Once a folder is removed by find -delete, it’s gone — not in the Trash, not recoverable without backups.
Test patterns with -print first to see what will be deleted. Run -delete only on specific subfolders you understand. Avoid running it on the entire home directory unless you’ve reviewed the output list.
For critical work, run a Time Machine backup before bulk deletion. The space cost of one extra hourly snapshot is trivial; the relief if something goes wrong is significant.
Empty folders are usually safe to delete, but the asymmetry is real: clearing them saves nothing material, while accidentally removing the wrong thing can cost actual data.