Tip: Delete all .DS_Store files with one command

NewImage

DS_Store files are invisible to us while we are using the Mac, but when we share folders with a Windows computer or when we use external drives on non-Mac computers it is when they make a nasty appearance.

If you want to delete all these files to give your Mac a clean you just have to run this command in Terminal:

sudo find / -name ".DS_Store" -depth -exec rm {} \;

It will ask you for the administrator password, and once you enter and confirm it, you just have to wait a little for it to run, and here it depends on your hard drive and the files you have in total.

Source | OS X Daily


Leave a Comment

Your email address will not be published. Required fields are marked with *

*

*

  1. Responsible for the data: Miguel Ángel Gatón
  2. Purpose of the data: Control SPAM, comment management.
  3. Legitimation: Your consent
  4. Communication of the data: The data will not be communicated to third parties except by legal obligation.
  5. Data storage: Database hosted by Occentus Networks (EU)
  6. Rights: At any time you can limit, recover and delete your information.

  1.   xtina36 said

    But as soon as you make a file modification in any directory, they reappear. For me it is better to have "see hidden files" active and when transferring documents you can delete them.

  2.   Numeric40 said

    I do not know how to thank you, I passed some photos to the MAC from the cell phone and after that those .DS_ and others appeared and even the machine did what I had never seen in MAC, it restarted itself! I followed your instructions to disappear the files and they immediately disappeared from view, I don't know if the power outage was due to the .DS files or what happened THANKS