A .DS_Store file is 9 KB, and deleting them all saves nothing
Counted on a real Mac: 61 files, half a megabyte. The reasons to remove them are real, and none of them is disk space.
.DS_Store files are hidden files Finder writes in every folder you open, holding the view settings for that folder: icon positions, sort order, window size. They appear in cleanup advice constantly, and their contribution to a full disk is essentially zero.
Count them on yours
# How many, and how much, in your home folder
find ~ -name ".DS_Store" -type f -print0 2>/dev/null |
xargs -0 stat -f "%z" 2>/dev/null |
awk '{s+=$1; n++} END {printf "%d files, %.2f MB, average %.0f bytes\n", n, s/1048576, s/n}'A machine with a hundred thousand folders might reach a few hundred megabytes. Most Macs are nowhere near that, and the command above settles it in seconds rather than repeating the claim.
The real reasons to delete them
| Reason | Why it matters |
|---|---|
| They end up in git repositories | Noise in every diff, and they reach colleagues on other systems |
| They appear on shared drives | Windows and Linux users see them as stray files |
| They are in zip archives you send | Untidy, and occasionally revealing about folder contents |
| A folder's view keeps resetting | A corrupt one is worth deleting, for that folder only |
Removing them, and stopping them where they do not belong
# Remove them under one folder. They come back when Finder opens it again.
find ~/Projects -name ".DS_Store" -type f -delete
# Stop macOS writing them to network shares, which is where they annoy others
defaults write com.apple.desktopservices DSDontWriteNetworkStores -bool true
# Keep them out of every repository you work in
echo ".DS_Store" >> ~/.gitignore_global
git config --global core.excludesfile ~/.gitignore_globalThe find -delete version does not move anything to the Trash, which is fine for these specifically and worth knowing before running it on anything else. The general set of commands for reclaiming space safely is in terminal commands to free space.
Deleting them also loses your folder view settings, which is the only cost and is usually invisible. To see them at all, show hidden files turns them on in Finder.
Common questions
How much space do .DS_Store files use?
Almost none. Measured on a Mac in September 2026, 61 of them totalled 0.52 MB, about 9 KB each. Even a machine with very many folders rarely reaches a few hundred megabytes.
Is it safe to delete .DS_Store files?
Yes. Finder recreates one when you next open the folder. You lose that folder's view settings, such as icon positions and sort order, and nothing else.
How do I stop .DS_Store files on network drives?
Run defaults write com.apple.desktopservices DSDontWriteNetworkStores -bool true, then log out and back in. It stops Finder writing them to network shares.
Why do .DS_Store files keep coming back?
Because Finder writes one each time it displays a folder. The only way to stop them locally is to stop opening the folder in Finder, so it is better to exclude them from repositories and shares than to delete them repeatedly.