Remove DS_Store Files on macOS

Remove DS_Store Files on macOS

Corrupted .DS_Store files can prevent OneDrive from syncing correctly. Deleting the corrupted files can help restore normal sync operation.

No data is lost by deleting the corrupted files as Mac Finder only creates .DS_Store files to store viewing options, such as the positions of icons, size of the Finder window, and window backgrounds.

  1. To delete a corrupted .DS_Store file, you will need to use Terminal.app.

    Note: You must be logged into macOS as an administrator.

    1. Open a new Finder window and navigate to the Applications folder on the left.

    2. Open the Utilities folder, then double-click the Terminal application.

  2. Give yourself super-user (root) permissions in Terminal so you can use the commands needed to delete .DS_Store files. 

    1. In Terminal, type sudo ls then press Return on your keyboard.

    2. When Terminal prompts you for a password, enter your administrator account password. If you don't have a password, leave it blank.

      Note: For security reasons, macOS won't show any sign that you are typing your password. Just type normally, even though nothing shows.

  3. Navigate to the folder that is not syncing correctly.

    1. In Terminal, type cd followed by a space.

    2. Find the folder with the issue but do not open it. Instead, drag its icon into Terminal and watch it complete the path for you, then press Return.

  4. Remove the .DS_Store folder and all its contents.

    Caution: Make sure you are deleting the correct folder.

    Type rm -f .DS_Store and press Return.

    Note: Terminal will give no indication that this has been completed. It will only return a message if the command did not work.

Need more help?

Online

Get online help
See more support pages for OneDrive and OneDrive for work or school.
For the OneDrive mobile app, see Troubleshoot OneDrive mobile app problems.

OneDrive Admins can also view the OneDrive Tech Community, Help for OneDrive for Admins.

Microsoft virtual support agent icon

Contact Support
If you still need help, contact support through your browser or shake your mobile device while you're in the OneDrive app.

OneDrive Admins can contact Microsoft 365 for business support.

Office 365 community forums

Tips
Letting us know your location may help us resolve your issue more quickly.

All fixed? If you contacted us and OneDrive starts working again, please let us know by replying to the email we sent you.

Expand your Office skills
Explore training
Get new features first
Join Office Insiders

Was this information helpful?

Thank you for your feedback!

Thank you for your feedback! It sounds like it might be helpful to connect you to one of our Office support agents.

×