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?

Account support. For help with your Microsoft account and subscriptions, visit Account & Billing Help.

Technical support. For technical support, select Contact Microsoft Support below, enter your problem and select Get Help.

Mobile users can contact Support by opening the OneDrive app and gently shaking your device.

Community support. Communities help you ask questions, give feedback, and hear from experts with rich knowledge. Ask the Microsoft Community. Do not disclose personal or sensitive information in public forums.