hard drive – How to find and delete .DS_Store files on local mounted disk?


On a Mac 10.14.6 I am using the following command to find and remove the annoying .DS_Store files. I want to find and delete these files only on the local mounted disk, not on any network drives:

find ~ -fstype local -name .DS_Store -exec /bin/rm -f -- {} ;

However, this command still reads mounted network drives (as I can tell from error messages regarding Input/Output errors on a network mounted drive). I do not want to search network mounted drives, this is why I did use the option -fstype local. But it seems not to work as expected.

Is there any other way I can find and delete all local occurrences of .DS_Store files?

I am aware of a similar question HERE, one solution is to use find to remove the files (which is exactly what I am trying), another answer is about to use fsevents to remove the .DS_Store files in real time. I tried the latter, but it does not work. These files are still being created. And also the defaults solution is not applicable for .DS_Store files created on the local mounted filesystem.

So at the moment I am left with no solution.