Skip to content

Instantly share code, notes, and snippets.

@todgru
Created November 20, 2012 17:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save todgru/4119535 to your computer and use it in GitHub Desktop.
Save todgru/4119535 to your computer and use it in GitHub Desktop.
Clean up those .DS_store files

Here are a few bits of info regarding .DS_Store files on Mac OSX. What they are: http://en.wikipedia.org/wiki/.DS_Store

The .DS_Store file is used to store metadata for icon information and are only created when using the gui to browse the file system.

Ways of removing them: http://helpx.adobe.com/dreamweaver/kb/remove-ds-store-files-mac.html

One time removal:

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

Periodic removal, stick it in cron. My fav.

$ sudo crontab -e
$ 15 1 * * * root find / -name ".DS_Store" -depth -exec rm {} \;

This will run daily at 1:15am, if the computer is on.

@faizahbegum
Copy link

find: /System/Volumes/Data/Library/Application Support/com.apple.TCC: Operation not permitted

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment