> What are .DS_Store files on Mac? Why Finder creates them on drives and shares, why they are safe to delete, and how to see hidden files in Finder.

[← All guides](https://maczentra.com/blog)System Data

# What Are .DS_Store Files? Safe to Delete?

The MacZentra team · Updated Dec 1, 2026 · 6 min read

A `.DS_Store` file (often searched as ds_store) is a small hidden file that Finder creates in a folder to remember how you view it: icon positions, sort order, window size and similar settings. It is safe to delete, because Finder rebuilds it, but removing it frees almost no space and resets that folder’s view. MacZentra's Junk Cleaner lists caches and logs with their sizes, and everything you remove goes to the Trash. It replaces hunting through hidden Library folders yourself. See [Junk Cleaner](https://maczentra.com/features#clean) or [try MacZentra free](https://maczentra.com/).

## What is a .DS_Store file?

The name stands for Desktop Services Store. Finder writes one into a folder after you open it and change how it looks, or sometimes just by browsing. It holds view settings for that folder, such as list or icon view, where icons sit, and how items are sorted. It does not contain your documents or photos, and it is typically only a few kilobytes.

The name starts with a dot, so Finder hides it. That is why most people only meet it on another computer, in a zip file, or in a code repository.

## Why .DS_Store files show up on drives and shares

Finder writes them wherever you browse in it, not only on your startup disk. You will find them on:

- **External drives and USB sticks** you opened on a Mac. On a Windows PC they appear as odd files you did not create.
- **Network shares** from a NAS or a file server, where other people see them in shared folders.
- **Archives and project folders** that you zip on a Mac, so the files travel with the content.
- **Downloads, Desktop and Documents** subfolders you have customised.

## How to see hidden files, including .DS_Store

The simplest Finder-safe method is a shortcut. Open the folder in Finder and press Command + Shift + . (the period key). Hidden items appear greyed out. Press it again to hide them. It changes only what Finder shows. It does not move or edit anything.

For a read-only look in Terminal, list one folder, including hidden items:

Terminal

```
ls -la ~/Desktop
```

To see all of them inside a folder tree without deleting anything, list the matches:

Terminal

```
find ~/Documents -maxdepth 3 -name ".DS_Store" -type f
```

This prints paths and nothing else. Replace `~/Documents` with the folder you care about.

![MacZentra Large Files view listing the biggest files first](https://maczentra.com/guides/large.webp)Large Files sorts by size, which is where real space is. A .DS_Store file would sit near the bottom of any such list.

Because the name begins with a dot, the same rule applies to other items you may have seen in Finder only after the shortcut, such as `.Trashes` on external drives. Leave anything you do not recognise alone. Hidden does not mean junk, and some of those items are used by macOS to manage the drive.

## Is it safe to delete .DS_Store?

Yes. Nothing breaks. The next time you open the folder in Finder it may create the file again and, if you deleted it, the folder goes back to default view settings. You lose custom icon positions or sort order for that folder, and nothing else.

It is worth removing in a few cases:

- **Before sending a folder or zip** to someone on another system.
- **In a code project**, where it clutters `git status`. Add `.DS_Store` to your `.gitignore` instead.
- **On a shared drive**, where the files look like clutter to everyone else.

If you only want free space, skip them. A folder tree can hold thousands of these and still add up to less than one photo. Real space comes from big files, caches and old downloads. See [how to find large files on a Mac](https://maczentra.com/blog/find-large-files-on-mac) and [how to find duplicate files](https://maczentra.com/blog/find-duplicate-files-on-mac).

## How to delete .DS_Store in one folder

- Press Command + Shift + . to show hidden files in the folder.
- Select the greyed-out `.DS_Store` and move it to the Trash.
- Hide hidden files again with the same shortcut and empty the Trash.

For a folder with many subfolders, preview first with the `find` command above, then decide.

## Why Finder keeps recreating them

Finder saves view settings whenever you open a folder and move, sort or resize something. Delete the file and look at the folder again, and a new one can appear. That is not a sign of a virus or a fault. It also means that mass-deleting these files is a chore with no end, which is why a setting or an ignore rule is a better answer than a cleanup run.

If you share a Mac with other people or copy folders to drives often, a one-off cleanup is the sensible choice. Do it when you hand something over, and leave the rest alone.

## Stop Mac creating .DS_Store on network drives

You can ask macOS not to write them to network shares. It is a per-user setting:

Terminal

```
defaults write com.apple.desktopservices DSDontWriteNetworkStores -bool true
```

Log out and back in afterwards. It only affects network locations, not your local disk or USB drives. To undo it, run the same command with `false`.

## Related folders and what to do with them

Hidden files like this are just one kind of clutter. If you are cleaning up after a hunt for what fills the disk, look at [how to check storage on a Mac](https://maczentra.com/blog/how-to-check-storage-on-mac) first, then [Library Caches](https://maczentra.com/blog/library-caches-safe-to-delete), [log files](https://maczentra.com/blog/delete-log-files-on-mac) and the [Downloads folder](https://maczentra.com/blog/clean-downloads-folder-mac). For a bigger plan, use [free up space on a Mac](https://maczentra.com/blog/free-up-space-on-mac). The system files you should not touch, like the ones in [what is sleepimage on a Mac](https://maczentra.com/blog/what-is-sleepimage-on-mac), are a different category.

## Questions people ask

### What is a .DS_Store file on Mac?

It is a hidden file Finder creates to save a folder’s view settings. It holds no personal content.

### Is it safe to delete .DS_Store files?

Yes. Finder can recreate them, and the only loss is custom view settings for that folder.

### How do I show hidden files on a Mac?

In Finder, press Command + Shift + .. Press it again to hide them.

### Why do .DS_Store files appear on my USB drive or Windows PC?

Finder writes them to any drive or share you browse on a Mac. Windows does not use them, so they look like stray files there.

### Do .DS_Store files take up space?

Almost none. Deleting them will not free noticeable storage.

## Everything MacZentra can clean

Treemap and Sunburst disk maps, a duplicate finder, Developer Junk, a complete app uninstaller and more, in one native storage cleaner for Mac that’s 15.4 MB.

[Explore all features →](https://maczentra.com/features)

## Related guides

[![Cover image for What Is Other in Mac Storage? (Now System Data)](https://maczentra.com/thumbs/editorial-what-is-other-in-mac-storage.webp)What is ‘Other’ storage?System Data · 6 minWhat Is Other in Mac Storage? (Now System Data)What is Other in Mac storage? Older Macs called it Other, newer ones say System Data. See what it held, what Other Volumes means, and how to shrink it.](https://maczentra.com/blog/what-is-other-in-mac-storage)[![Cover image for Purgeable Space on Mac: What It Is](https://maczentra.com/thumbs/editorial-purgeable-space-on-mac.webp)Where did your space go?System Data · 6 minPurgeable Space on Mac: What It IsPurgeable space on Mac explained: what it holds, why Finder and Storage settings disagree, how macOS frees it, and when you can safely ignore the number.](https://maczentra.com/blog/purgeable-space-on-mac)[![Cover image for Sleepimage on Mac: What It Is and Is It Safe?](https://maczentra.com/thumbs/editorial-what-is-sleepimage-on-mac.webp)What is sleepimage?System Data · 6 minSleepimage on Mac: What It Is and Is It Safe?What is the sleepimage on a Mac? Learn why /private/var/vm, sleepimage and swap files exist, how to check their size safely, and why not to delete them.](https://maczentra.com/blog/what-is-sleepimage-on-mac)[![Cover image for Best Mac Storage Cleaners 2027: Compared & Ranked](https://maczentra.com/thumbs/editorial-best-mac-storage-cleaners.webp)Compare before you cleanCheck storage · 9 minBest Mac Storage Cleaners 2027: Compared & RankedMac storage cleaners and disk space analyzers compared by price, size, scan speed and licence. One-time, subscription and free options side by side.](https://maczentra.com/blog/best-mac-storage-cleaners)

Source: https://maczentra.com/blog/what-are-ds-store-files
