How to Stop .DS_Store From Being Created on Network Drives (OS X)

.DS_Store files can make even the tidiest network shares look horrible to none-OS X users.

Whenever an OS X machine accesses a network share, it creates a .DS_Store file for it’s own use (on SMB/CIFS, AFP, NFS, and WebDAV servers).  These files are invisible to the OS X user, but will show up to anyone else using other operating systems such as Windows or a Linux distribution.

Turning them off is easy though, by running the following command:

defaults write DSDontWriteNetworkStores true

You will need to either log off or restart the computer for the changes to take affect.

For more information, please see the official knowledge base article here:

3 replies on “How to Stop .DS_Store From Being Created on Network Drives (OS X)”

    1. Thanks for the comment/question Wayne!

      From my testing just now, it stops the Finder creation of the ._* Finder files too.
      However, some applications create their own ._ files when they edit them.. and they still get created – this command only affects the Finder (for example if you copy a file to a remote server).

      .DS_Store might be useful in networks with multiple Mac’s though (various information is stored in there), but I know a lot of people want to turn it off to keep things a little bit tidier.

  1. Thanks for replying 🙂

    I’ll have to see how many ._ files I still get then.

    It is/was a nightmare using a NAS drive to store copies of website files because I then have to go through and delete all of the ._ files before uploading to the server or upload all the ._ files as well. Very time consuming with WordPress 🙁

    I’ll have to download the latest version to the NAS and unzip it and see what happens now.

Comments are closed.