Delete .DS_STORE files in current folder and all subfolders from command line on Mac
find
can do that. Just add -delete
:
find . -name ".DS_Store" -delete
find . -name ".DS_Store" -print -delete
This will delete all the files named .DS_Store
in the current path while also displaying their relative paths
You can also use extended globbing (**
):
rm -v **/.DS_Store
in zsh, bash 4 and similar shells (if not enabled, activate by: shopt -s globstar
).