Stop MacOS from writing .DS_Store files on Network Shares

It will do this on every sub-directory you navigate to on any SMB write-enabled share you browse.
These files only contain Finder related view and other non-necessary metadata, they are totally safe to delete.

Run this command to ensure MacOS/Finder stops writing these files for network shares.

defaults write com.apple.desktopservices DSDontWriteNetworkStores -bool TRUE

Note there isn't presently a way to stop these files from being created on local filesystems. Thx Tim...

More from Mario's Notes
All posts