Summary: DS_Store files are created by macOS to store folder information. They are safe to remove. Learn how to delete DS_Store files on Mac using Terminal and MacMaster.

Many users don't know there are invisible files in the Mac file system before they find a file named by .DS_Store in a folder one day. Like Linux operating system, any file with a name starting with a dot in Mac is a hidden file or system file which the system doesn't want you to modify. Therefore, .DS_Store files are usually invisible unless you make the hidden files visible by some methods.

Generally, you don't need to clean .DS_Store files on Mac, but if Finder is misbehaving when opening a folder, which is a sign that .DS_Store files are corrupted, or if you need to reset folder's information, you will need to delete .DS_Store files. Here is how to remove .DS_Store files on Mac.



What's .DS_Store File on Mac?

DS stands for Desktop Services and DS_Store files are generated by Mac OS to maintain the display of the folder window. This kind of file records the icon position, size and position of the folder window when you open and browse it last time on Finder. DS_Store files take up very little space on Mac and maintain a customized display for users. There is no benefit or need for removing them.

DS Store Files


Is It Safe to Remove .DS_Store Files

DS_Store files are good for the Mac system. If you need to remove the files but worry about the potential damage caused by removing them, I can assure you that there is no damage other than resetting the display customization of the file folders on Finder.

And after you remove the DS_Store files, Mac will re-create the new .DS_Store files when folder preferences are changed.

There are in fact some situations where you need to delete DS_Store files:

  • You want to reset the display preference of this file folder. After deleting, a new DS_Store File will be generated.

  • A file folder cannot be opened properly using Finder, for example, you can't see folder icons, change view options, etc.

Folders in Finder


How to Delete DS_Store Files

There are two ways to delete this file. One is to use the complex Terminal utility on Mac which requires you to input many Unix-like commands. The other way is to use an easy-to-use and user-friendly third-party software. I recommend users who are unfamiliar with the Terminal to choose the second method.


1. Use MacMaster

FonePaw MacMaster is a clever Mac cleaner that can help you easily delete DS_Store files. It is quite easy to operate and you can use it by just following the common sense.

You can also use the application to clear other system files, duplicate files, caches, application and related data and more.

The basic steps are as below:


Step 1Download FonePaw MacMaster and install it on your Mac.

Free Download

Step 2Launch FonePaw MacMaster.

Step 3On the main interface of the app, select Extensions by clicking this option on the left side menu.

Scan DS_Store Files

Step 4Click the Scan button on the bottom to find out unwanted files.

Step 5Click Login. On the right side of the interface, tick off all DS_Store files and hit the Clean button on the bottom.

Clean DS_Store Files

Other than removing junk files, it can also find and remove duplicate files, iTunes junk and old&large files on Mac. In addition, it possesses an Uninstaller feature which can help you uninstall the software quickly and easily. It can also manage the privacy data and plug-in on the Mac.


2. Use Terminal

The Terminal is a Mac OS built-in utility which is a text command interface and is more powerful than the graphic interface. Below are basic steps to use Terminal to remove DS_Store files.


Run Terminal

Step 1Open Terminal by either double-clicking it in Launchpad or searching it in Spotlight. (You can activate Spotlight by holding both Space key and Command key).

Step 2Input below command and hit the Enter key: sudo find / -name ".DS_Store" –depth –exec rm {} \; If you are familiar with Unix commands, you should know this command is to find .DS_Store files and do the remove execution on them.

Step 3All the .DS_Store files on the system will be erased but they can again be generated when the folders are accessed by users or systems in the future.

After the above illustration, I believe you now know what .DS_Store is and how to handle it.