Safe to Delete

.DS_Store

Quick Answer: A hidden macOS file that stores folder view preferences. Completely safe to delete, though your Mac will just create a new one.

Bottom Line: It is 100% safe to delete .DS_Store files. They are harmless preference files created by macOS, but they are completely unnecessary.

What is a .DS_Store file?

.DS_Store (Desktop Services Store) is a hidden file automatically generated by macOS in almost every folder you open.

Its only job is to remember how you customized that specific folder. For example, if you change a folder’s icon size, sort files by “Date Added,” or change the background color of the Finder window, macOS saves those visual preferences inside the .DS_Store file for that folder.

Windows and Linux users often see these files scattered around USB drives or downloaded ZIP files that were previously plugged into or created on a Mac.

Can you delete it?

✅ Yes, it is perfectly safe to delete.

Because these files only store visual view settings, deleting them does not delete any of your actual files, documents, or data.

How to delete it

On Windows: You can just right-click the file and select Delete. It will not come back unless the drive is plugged into a Mac again.

On a Mac: You can drag the file to the Trash. However, the moment you open that folder again in Finder, macOS will silently generate a brand new .DS_Store file. To permanently stop macOS from creating these files on network drives and USBs, you can use the Terminal:

  1. Open Terminal.
  2. Paste this command: defaults write com.apple.desktopservices DSDontWriteNetworkStores true
  3. Press Enter, then restart your Mac.

What happens after you delete it?

Nothing bad. The only consequence is that the folder will forget your custom view preferences. For instance, if you had set the icons to be extra large, they will revert to the default standard size the next time you open the folder.

Discussion

Loading authentication...

Related in macos

macOS Background Download Session Cache (com.apple.nsurlsessiond)

nsurlsessiond caches incomplete background file downloads for system apps and iCloud daemon sync. Clearing the cache is safe.

Safe to Delete

macOS Font Server Cache (/var/db/ats)

Apple Type Services (ats) caches font rendering metrics. Resetting the font cache fixes corrupted font glyphs and system text glitches.

Safe to Delete

macOS System Font Cache Directory (com.apple.fontd)

macOS caches system and user font rendering structures in com.apple.fontd. Learn how to reset macOS font cache to fix garbled text.

Safe to Delete
Back to all files