This site requires JavaScript to be enabled
Knowledge Base: Public
Category: Desktop & Mobile Computing / Desktop Support
4504 views

Question

How do I prevent macOS from creating .DS_Store files on network volumes?

Overview

Hidden .DS_Store (short for Desktop Services Store) files are created in any folders accessed by Macs. .DS_Store files are a proprietary Apple file type that store custom attributes of a folder, such as the position of icons or the choice of a background image. Though these files are small and hidden from normal view, they can cause unwanted clutter.

Answer

To Prevent .DS_Store files from being created on network volumes:

  1. Launch the Terminal Application
  2. Enter the following command in Terminal

sudo defaults write /Library/Preferences/com.apple.desktopservices DSDontWriteNetworkStores true

  1. Reboot 

At this point current user and new users will no longer create .DS_Store files when network volumes are accessed from that Mac.