How to delete the Finder DS_Store file

How can I delete the Finder DS_Store file? There are utilities available that will delete all DS_Store files, but none that I could find that only delete the one file. I can use the terminal if neccessary.


If I restart the Finder, does this automatically delete the Finder DS_Store file and recreate a new one in its place?


MacOS 15.7.3. Mini M2Pro

Mac mini (M2 Pro, 2023)

Posted on Dec 30, 2025 6:07 AM

Reply
Question marked as Top-ranking reply

Posted on Dec 30, 2025 11:16 AM

Shift-Command-. displays invisible Finder items but somehow that does NOT include .DS_Store files. So use the Terminal for that (Sequoia 15.7.3 screenshot):



You can delete .DS_Store file in Terminal via 'rm .DS_Store'


AFAIK .DS_Store stores some Finder settings. But I have given up trying to save Finder folder settings like folder size and location by deleting .DS_Store and using other voodoo to act it like it used to do in ancient Finder in System 1-9.


ps. I use dot_clean to delete other '._' dot files from FAT-formatted disks that confuse my "smart" TV. Those files carry some Mac-specific extended file attributes that Windows does not understand (and are usually not needed anyway):


dot_clean -mn [folder path]
9 replies
Question marked as Top-ranking reply

Dec 30, 2025 11:16 AM in response to tacitus99

Shift-Command-. displays invisible Finder items but somehow that does NOT include .DS_Store files. So use the Terminal for that (Sequoia 15.7.3 screenshot):



You can delete .DS_Store file in Terminal via 'rm .DS_Store'


AFAIK .DS_Store stores some Finder settings. But I have given up trying to save Finder folder settings like folder size and location by deleting .DS_Store and using other voodoo to act it like it used to do in ancient Finder in System 1-9.


ps. I use dot_clean to delete other '._' dot files from FAT-formatted disks that confuse my "smart" TV. Those files carry some Mac-specific extended file attributes that Windows does not understand (and are usually not needed anyway):


dot_clean -mn [folder path]

Dec 30, 2025 7:30 AM in response to tacitus99

If I understand correctly, your problem is that the icon for your NAS drive moves to a different place in your Desktop. This in principle has nothing to do with the .DS_Store files.

If anything, you may have to look at your Finder view settings for the Desktop.

Click on an empty area of the Desktop to make it active.

Choose View->Show View Options, and, under Sort by, choose None.

Dec 30, 2025 6:45 AM in response to lkrupp

I have a mounted disk ( NAS) icon showing on the desktop. For reasons nobody can explain this shifts around when I do various things. EG open Automator, photos, a Pages file, a Bookends (citation software) file. In one case I connected my iPhone, opened iMazing and the disk icon moved across the desktop.


In most of those cases there is no apparent connection between data on the NAS and the particular app; it seems to happen more or less at random.


It has been suggested that removing the finder DS_Store file *might* provide a solution. I am aware there are other means of accessing the NAS but deleting only the Finder DS_Store file appears risk free and worth a try.


I'm currently in the user account but I imagine the terminal command would use sudo and an admin password.


I should add that the NAS is a QNAP. I also have a Synology which for whatever reason does not exhibit the same behaviour.

How to delete the Finder DS_Store file

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.