Take the 2-minute tour ×
Ask Different is a question and answer site for power users of Apple hardware and software. It's 100% free, no registration required.

If I manually delete a .DS_Store file from a directory, what's the worst that can happen? What important information might I lose?

share|improve this question

3 Answers 3

up vote 41 down vote accepted

.DS_Store files are only used by the Finder to hold custom view settings for that particular folder. In most cases nothing will happen if you delete them, or at worst custom Finder view settings (icon size, position, background color, etc) will be lost.

If you are trying to maintain a 'spatial Finder' experience in OS X, you might care more, but for most users no change will be noticed.

share|improve this answer
2  
Not quite correct, comments are lost when deleting .DS_Store files! –  akuhn Nov 12 '12 at 23:01
    
actually, the comments are still in the extended file attributes, but the Finder won't try to read from there. to see yourself: mdls -n kMDItemFinderComment myfile –  mb21 Jun 28 '13 at 14:14

The worst that will happen is that folder display attributes (icon positions and view settings) will go away. If you don't consider icon positions and view settings important, there is no important information stored in these files, so it is safe to delete them.

share|improve this answer

As far as I can tell, they store all the settings shown in view options in icon and list view (or parts of the settings after some of them have been changed).

In column view the options at the bottom are the same for all folders, but the arrange by and sort by modes are still saved in .DS_Store files.

Always open in means "save the previously used view mode of this folder to a .DS_Store file". It overrides the default view mode (FXPreferredViewStyle, which is often changed after closing a window). If you check "Always open in column view" and press ⌘1, the folder-specific view mode becomes icon view.

.DS_Store files also contain the default dimensions of windows, the shown parts of windows, the positions of icons in icon view, and the width of the sidebar.

Spotlight comments are stored in both .DS_Store files and extended attributes. If you delete a .DS_Store file, Finder won't see the comments, but Spotlight will.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.