Find and delete all .DS_Store files recursively

Alec Jacobson

November 06, 2009

weblog/

This is posted all over the web, but sanity's sake I'll post it again here. This use of the unix command line program find will locate and remove all the .DS_Store files that Finder populates throughout your directories. The following removes all files by the name .DS_Store in the current directory recursively:
find . "-name" ".DS_Store" -exec rm {} \;