Tech, Gadgets, Photography, Social Media and Poor Spelling

Delete All .DS_Store Files from Mac OS X and if you’re smart your network too..

This i a great tip and if you understand just how it works, then you can also clear down mapped network drives where a rouge Mac user may have got on the lag and deposited .DS files all over the place as well. It also works for other file names

DS_Store Files in Mac OS X


DS_Store files are hidden system files that reside within almost every folder of Mac OS X, they contain folder-specific information and settings, like what view to use, icon size, and other metadata pertaining to their directory. Though they’re invisible to the average user, if you’re sharing with a Windows PC or have hidden files shown in Finder you’ll see them in every folder, and if you’re trying to force a change like which view to use across all directories in Finder, you may discover the .DS_Store files are in the way.

How to Delete All DS_Store Files from a Mac

    1. Launch Terminal, found in /Applications/Utilities/
    2. Type the following command exactly:

sudo find / -name ".DS_Store" -depth -exec rm {} \;

  1. Enter the administrator password when asked – it won’t be visible when typing which is standard for the command line
  2. Let the command run, it will find all instances of .DS_Store and delete them

You can also go a step further and use a defaults write command to disable .DS_Store creationwhich can help to avoid clutter on networked drives.

If your annoyance with DS_Store stems from networking, you may notice that Windows PC’s have similar metadata files in all directories called “Thumbs.db“, those can also be removed separately by using Spotlight.

This is a handy tip from Adobe, of all places. Adobe also shows how to use crontab to schedule the deletion of .DS_Store files, but if you delete them once and disable their creation you shouldn’t need that functionality. Thanks for the tip idea Andy!

By William Pearson – Command LineMac OS XTips & TricksTroubleshooting

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s


This entry was posted on July 7, 2012 by in Apple, OsX, osxdaily, tip and tagged , , , , , , , .
%d bloggers like this: