Until a little while ago the .DS_Store file was well hidden from my eyes. During my daily work process, I started to realize this DS_Store file was appearing almost everywhere. Soon its presence became a question of its occurrence and need. I tried opening this strange file but couldn’t do so.

When I tried to open the DS_Store file I was presented with an error saying, “There is no application set to open the document “.DS_Store”.

My overall experience with DS_Store file made me scratch my head and dig deep into its occurrence & behaviour.

.DS_Store file? What – Why – Where – How?

 

What is a .DS_Store file?

can't delete ds_store file

.DS_Store file

It expands to Desktop Services Store and is a hidden file that holds crucial information regarding a folder. Even things like the Mac desktop and all its volumes, external drives, etc, all are treated as a folder.

With its common occurrence overall, a common question arises, why is the .DS_Store file present everywhere and what is its importance to OS X or you?

The .DS_Store file is there to hold folders icon information, settings, thumbnail and background image information.  DS_Store is a metadata file for a respective folder. A single DS_Store file is well placed and can be located when a user navigates through different partitions, folders & sub-folders on Mac OS X.

You will even find DS_Store files on remote computers; that is, if the Mac is shared through the network. Even when you plug an external drive into your Mac it will create a DS_Store file.

It’s not just Macs that utilize this method. If you have been a PC user then you may have come across the Thumbs.db file. The DS_Store is similar to Thumbs.db on a Windows computer.

.DS_Store file is a hidden OS X file that won’t reveal until you unhide the files on system. You can unhide all the files on OS X using the terminal command:

defaults write com.apple.Finder AppleShowAllFiles YES

Hit return and type:

killall Finder

This command will result in revealing all hidden files on the desktop, connected volumes and other folders.

.DS_Store can not be permanently trashed.

Even if you move this file to trash and proceed with ‘Empty trash‘ it will reappear again in its original location. Also, keep in mind that Apple purposely made these files hidden just to ensure the OS X run uninterruptedly. Any other hidden file trashed may cripple an application software or can cause serious logical corruption to OS X Mac. So, be very cautious and don’t mess with these hidden files unless you are absolutely positive what you are doing.

 

Where does .DS_Store file get created?

  • On a Flash drive
  • USB HDD
  • Network Volumes
  • Remote Systems

The DS_Store file can be seen when above mentioned devices are connected or mounted with the Mac OS X. As we know now, every device is a considered folder on Mac, the Finder creates this DS_Store file when the OS X detects an external media.

 

Is there a need to remove .DS_Store file from Mac OS X?

DS_Store file size

File Size

No, if you are a Mac user then there is no need to find tricks & tips to permanently remove the DS_Store file.

This file consumes negligible space on the Macintosh hard drive. Just look at the screenshot that I took from my desktop. I believe a file the size of 25 KB is of no concern for a Mac OS X user. I also checked the file size on my OS drive, which was only 29 KB.

The best thing to do is just leave the file alone. The best way to do that is just set it back to the default setting of being hidden from sight.

If your hidden files aren’t already hidden:

Open terminal
Type:
defaults write com.apple.Finder AppleShowAllFiles No
Hit Return
Type:
KillAll Finder
Hit Return