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:
- Open Terminal.
- Paste this command:
defaults write com.apple.desktopservices DSDontWriteNetworkStores true - 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...