{"id":101,"date":"2026-02-06T18:22:38","date_gmt":"2026-02-06T10:22:38","guid":{"rendered":"https:\/\/dreamhax.cc\/?p=101"},"modified":"2026-02-06T18:22:39","modified_gmt":"2026-02-06T10:22:39","slug":"managing-ds_store-files-on-network-and-usb-drives","status":"publish","type":"post","link":"https:\/\/en.dreamhax.cc\/index.php\/2026\/02\/06\/managing-ds_store-files-on-network-and-usb-drives\/","title":{"rendered":"Managing .DS_Store Files on Network and USB Drives"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">If you&#8217;re tired of macOS cluttering up every folder with hidden <code>.DS_Store<\/code> files, you can easily disable them for non-local drives using a few Terminal commands.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>For Network Drives:<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>defaults write com.apple.desktopservices DSDontWriteNetworkStores -bool TRUE<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>For External Media (USB sticks, etc.):<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>defaults write com.apple.desktopservices DSDontWriteUSBStores -bool TRUE<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>How to Apply the Changes:<\/strong> For these settings to take effect, you\u2019ll need to either <strong>restart your Mac<\/strong> or <strong>relaunch Finder<\/strong> (you can do this via the &#8220;Force Quit&#8221; menu).<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>How to Undo:<\/strong> If you ever need to revert to the default behavior, simply run the same commands again but replace <code>TRUE<\/code> with <code>FALSE<\/code> at the end.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Cleaning Up Existing Files via PowerShell<\/strong>:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\"Z:\\\",\"Y:\\\" | % { if(Test-Path $_){ Write-Host \"Cleaning $_...\" -F Cyan; Get-ChildItem -Path $_ -Include \".DS_Store\" -Recurse -Force -EA SilentlyContinue | Remove-Item -Force -Verbose } }<\/code><\/pre>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p class=\"wp-block-paragraph\">Replace <code>Z<\/code> or <code>Y<\/code> with the actual letter assigned to your network map or USB drive (e.g., <code>\"D:\\\",\"E:\\\"<\/code>)<\/p>\n<\/blockquote>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n","protected":false},"excerpt":{"rendered":"<p>If you&#8217;re tired of macOS cluttering up every folder with hidden .DS_Store files, you can easily disable them for non-local drives using a few Terminal commands. For Network Drives: For External Media (USB sticks, etc.): How to Apply the Changes: For these settings to take effect, you\u2019ll need to either restart your Mac or relaunch [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[113],"tags":[111],"class_list":["post-101","post","type-post","status-publish","format-standard","hentry","category-system","tag-macos"],"_links":{"self":[{"href":"https:\/\/en.dreamhax.cc\/index.php\/wp-json\/wp\/v2\/posts\/101","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/en.dreamhax.cc\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/en.dreamhax.cc\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/en.dreamhax.cc\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/en.dreamhax.cc\/index.php\/wp-json\/wp\/v2\/comments?post=101"}],"version-history":[{"count":1,"href":"https:\/\/en.dreamhax.cc\/index.php\/wp-json\/wp\/v2\/posts\/101\/revisions"}],"predecessor-version":[{"id":102,"href":"https:\/\/en.dreamhax.cc\/index.php\/wp-json\/wp\/v2\/posts\/101\/revisions\/102"}],"wp:attachment":[{"href":"https:\/\/en.dreamhax.cc\/index.php\/wp-json\/wp\/v2\/media?parent=101"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/en.dreamhax.cc\/index.php\/wp-json\/wp\/v2\/categories?post=101"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/en.dreamhax.cc\/index.php\/wp-json\/wp\/v2\/tags?post=101"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}