The Finder automatically places a .DS_Store file into every folder you have opened. .DS_Store files are created by the Finder during its normal course of operation. These files hold view options, including the positions of icons, size of the Finder window, window backgrounds plus many more properties but are hidden from the user's view.

.DS_Store files can become corrupted and cause Finder to behave oddly when you open the folder that contains it. Corrupted .DS_Store files cause problems like a Finder window blinking open and then closing, the inability to see some icons, or sort icons, or to change the view options.

Steps

  1. 1
    To delete a corrupted .DS_Store file you will need to use Terminal.app. To do that you must be logged into Mac OS X as an administrator.
  2. 2
    Open Terminal.
    Advertisement
  3. 3
    Give yourself super-user (root) permissions in Terminal so you can use the commands needed to delete some .DS_Store files. This is done using the 'sudo' command (Switch User and Do).
  4. Advertisement
Method 1
Method 1 of 2:

Navigate to the Folder with the Corrupted .DS_Store File

You must now navigate to the folder with the corrupted .DS_Store file or this procedure won't correct your problem (unless it's the folder where terminal naturally opens, usually your home folder. There are two methods to accomplish this task.

  1. 1
    Method 1: Use the 'cd' (Change Directory) command along with the path to the folder in need of repair.
  2. 2
  3. Advertisement
Method 2
Method 2 of 2:

Delete the .DS_Store File

You can now remove the .DS_Store folder and all its contents with one very powerful command. The 'rm' (Remove) modified by '-f' removes all files and folders contained in the target name. DO NOT MIS-TYPE this command.

  1. 1
    Type rm -f .DS_Store and press Return. Terminal will ask for no confirmation and give no indication that this has been completed - it will only return a message if the command did not work.
  2. 2
    You should now be able to navigate to the folder in finder and the issue should be corrected.
  3. Advertisement

Warnings

  • .DS_Store files do not contain anything vital and can be deleted without fear of serious repercussions. Finder creates its contents as needed. The same cannot be said for everything in the operating system. Do not delete files if you do not know what they do.
    ⧼thumbs_response⧽
  • Terminal.app is an application that works entirely on text based input. A simple misspelling or accidental keystroke in Terminal can have serious consequences. Follow well documented Mac OS X Terminal procedures until you know what you are doing.
    ⧼thumbs_response⧽
Advertisement

Things You'll Need

  • Mac OS X 10.0 or newer.
  • An Administrator account and password.

About This Article

wikiHow is a “wiki,” similar to Wikipedia, which means that many of our articles are co-written by multiple authors. To create this article, 18 people, some anonymous, worked to edit and improve it over time. This article has been viewed 254,447 times.
How helpful is this?
Co-authors: 18
Updated: June 3, 2021
Views: 254,447
Categories: Mac OS X
Advertisement