Yes, deleting .DS_Store files is completely safe. They are tiny Finder metadata files macOS creates in every folder you open, and removing them won't harm your data, your apps, or the system. The catch: Finder recreates them the moment you reopen the folder, so chasing them across your whole drive is busywork.
TL;DR
.DS_Store(Desktop Services Store) holds per-folder Finder settings: icon positions, window size, view style.- They are safe to delete; nothing breaks and no real data lives in them.
- They regenerate automatically next time Finder opens the folder.
- Each file is tiny (a few KB), so deleting them rarely frees meaningful space.
- The one good reason to remove them: before zipping or sharing a folder, so they don't leak into the archive.
What is a .DS_Store file?
.DS_Store is a hidden file Finder drops into any directory it displays. It records how you arranged that folder's window: where icons sit, the chosen view (icons, list, columns), window size and position, and which background you set. The leading dot keeps it hidden, which is why you usually never see it.
You can reveal them temporarily in Finder with Cmd + Shift + . (period). You'll find a .DS_Store in your home folder, Documents, Downloads, and essentially anywhere you've browsed.
Is it safe to delete .DS_Store files?
Yes. These files store presentation preferences, not your documents. Delete one and the only consequence is that the folder forgets its custom icon layout and reverts to defaults. Finder rebuilds the file as soon as you open that folder again.
To clear them across a folder tree from Terminal:
find ~/Downloads -name '.DS_Store' -type f -delete
That removes every .DS_Store under ~/Downloads. Swap the path for any folder you want to clean. There is no undo, but since these files carry no real data, that's fine.
What macOS does natively, and where it stops
macOS manages .DS_Store files silently and never asks you to clean them. There is no built-in setting to disable them on local volumes, and no maintenance task that removes them. The system simply assumes you want your folder layouts remembered.
Where it stops: macOS makes no effort to keep these files out of archives or shared folders. When you zip a directory or copy it to a USB drive, the hidden .DS_Store rides along, which is how Windows and Linux users end up seeing stray .DS_Store entries in folders you've shared.
What deleting them cannot do, and what to leave alone
Don't expect a storage win. Even thousands of .DS_Store files usually add up to a few megabytes total. If you're hunting for space, large media, app caches, and old downloads are far better targets.
Leave the deletion to a one-time pass, not a habit. Because Finder regenerates them instantly, repeatedly purging .DS_Store files accomplishes nothing. The genuinely useful moment is right before you compress or upload a folder, so the archive stays clean for whoever opens it next.
Finally, don't go deleting other dot-files indiscriminately just because they're hidden. Plenty of hidden files matter. If you're curious how that logic applies on other systems, see the AppData folder explainer.
FAQ
Will deleting .DS_Store break my folders?
No. The folder loses only its remembered Finder layout (icon positions, view style, window size) and falls back to defaults. Your files are untouched, and Finder recreates the .DS_Store the next time you open the folder.
Can I stop macOS from creating .DS_Store files?
There's a Terminal tweak (defaults write com.apple.desktopservices DSDontWriteNetworkStores true) that prevents them on network shares and external volumes, which is where they cause the most friction. macOS does not offer a supported way to disable them on your internal drive.
How much space do .DS_Store files take up?
Very little. Each is typically a few kilobytes. Even across a heavily used drive the total is usually a handful of megabytes, so deleting them is about tidiness, not reclaiming storage.
The same idea travels to your pocket: a phone collects far more stray clutter than a Mac. Cleanor for iPhone helps you spot and clear the files that actually take up space.