Delete the invisible .DS_Store files on all mounted Disks from all folders and application packages

Oct 12, 2009 12:35 GMT  ·  By

.DS_Store (Desktop Services Store) is a hidden file created by Mac OS X with the purpose of storing custom attributes of a folder, including the position of icons, or the choice of a background image. By default, the Mac OS X Finder will create a .DS_Store file in every folder that it accesses, and even in folders on remote systems. Such a file is created even if the user has only customized the appearance of the folder by moving its Finder window. Those bugged by this behavior can now use a tool that eliminates these files by default, saving space, as well as reducing the fuss of having to delete each one by hand.

.DS_Store files were initially envisioned as a more general-purpose store of metadata regarding the display options of folders, such as icon position and view settings. On Mac OS X 10.4 Tiger, for example, .DS_Store files also contain the Spotlight comments of all the folder's files, whereas Mac OS X 10.5 "Leopard" stores this information in Extended file attributes.

Not surprisingly, complaints from users about these files being created on remote systems prompted Apple to post an article on the Support section of its site. The document details how to disable the creation of remote .DS_Store files over network connections. Although fairly insightful, the Support article contains instructions that do not apply to local drives, including USB flash drives.

Luckily, there’s a solution from developer Tom X, who is offering iRemove .DS_Store Files, an AppleScript that deletes the invisible .DS_Store files on all mounted disks from all folders and application packages. The script quits the Finder, does the magic, and relaunches the Finder again. iRemove .DS_Store Files is supported on Tiger and Snow Leopard.

Download iRemove .DS_Store Files (Free) (requires Mac OS X 10.4 or Mac OS X 10.6)