Fix: OneDrive Automatically Deleting Files from it’s Folder

OneDrive may keep deleting your files if your system’s hard disk has bad sectors or is failing. Moreover, outdated Windows and OneDrive client may also cause the error under discussion.

The user gets the information of the issue when he gets a message that he had deleted files from OneDrive or when he opens OneDrive and finds his files missing. The issue is reported on Windows PCs as well as on Mac systems. Both, i.e. Personal and Business/Office 365, versions of OneDrive are reported to be affected.

Although there are some instances on individual folders, a major blow was reported on shared folders. The severe damage was reported by the user where folders were present in the OneDrive client but files in the folders have vanished. Additionally, the issue is also reported by the users who were able to solve the issue priorly.

OneDrive Automatically Deleting Files from OneDrive Folder

Before moving on with the solutions to stop OneDrive from deleting your files, make sure the date and time of your system are correct. Moreover, it is a good idea to avoid nested folders in OneDrive because some users reported that OneDrive was not able to handle the nested folders well. Furthermore, unlink your OneDrive from all PCs (during the troubleshooting process) except the problematic one.

Solution 1: Restore Your Deleted Files

The first step in the troubleshooting process should be to restore the deleted files. Follow the steps mentioned below to try to restore the files (this process can be a bit tedious):

  1. Backup the files present in your system’s OneDrive folder to someplace safe (but not in an OneDrive folder).
  2. Right-click on the OneDrive icon in your system’s tray and then click on Help and Settings (near the bottom of the menu shown).
  3. Then, select Settings and navigate to the Account tab.
    Open Settings of OneDrive
  4. Now click on Unlink This PC and then confirm to unlink the PC from OneDrive.
    Unlink PC from OneDrive
  5. Repeat the same process on all other PCs where your OneDrive account was being used.
  6. Now, disconnect all your systems from the internet and exit the OneDrive application (even from the system’s tray) on all the linked systems.
    Exit OneDrive from the System’s Tray
  7. Open the recycle bin of your system and check if the OneDrive’s deleted files are there. If the files are not there, then open the OneDrive website and check its Recycle Bin for deleted files. If the deleted files belong to a shared folder, then check the recycle bin (system OneDrive folder and OneDrive web) of the owner of the folder for deleted files. If deleted files are not even there, then you may have to contact a data recovery specialist to recover your data (as soon as possible).
    Restore OneDrive Deleted Files From the System’s Recycle Bin
  8. If the files are present in the Recycle Bin of your system, then select those files and then right-click on them. Then click on Restore and check if the files are restored to your OneDrive folder (do not open the OneDrive application but use the File Explorer to open the OneDrive folder). It will be better to copy these files to a place other than OneDrive. If you cannot Restore the files from the Recycle Bin, then try to restore files one by one and if that does not solve the issue, you may have to rename the root OneDrive folder or you can restore (cut/paste) the files to another location.
  9. Then, launch a web browser (on another PC where your OneDrive account was not used) and open the OneDrive website.
  10. Then open the Recycle Bin of the website (in the left pane of the browser window) and check if the deleted files are present there. If the files are present there, then select the files and then click on Restore the files. If the status bar does not show progress, check if the files from the recycle bin are disappearing/restoring.
    Restore OneDrive Deleted Files From OneDrive Web
  11. Now compare the files between the affected system and web version (if possible). Keep in mind that folders may be present there but maybe empty inside; hence, open each & every folder and compare the files.
  12. Then download or backup the files that you want to keep (so you have all your required files/data on the new system).
  13. Now, delete the files from the OneDrive folder on the affected PC and OneDrive web (this is important because if the files are not deleted, then there can be multiple copies of the same file and it will be really difficult to sort out the data/files or you may have to delete tons of duplicates from OneDrive folder).
  14. Then upload your downloaded/backup files/ data to OneDrive web.
  15. Connect the affected system to the Internet and open the OneDrive application.
  16. Then login to the application with your credentials and hopefully, your files are restored successfully.

If you are encountering the file deletion issue with the Office 365 version of OneDrive, then you can use Files Restore to restore your files. But keep in mind it will not only restore the affected/deleted files but all other files, so, create a backup of the files you do not want to revert.

  1. Launch a web browser and navigate to the OneDrive website.
  2. Now login with the Office 365 credentials (or if already logged in, make sure you are using the correct account) and then click on the Gear/Settings icon.
  3. Now select Restore your OneDrive on the menu. If the said option is not shown, select Options and then select Restore your OneDrive.
    Open OneDrive Web Options
  4. Now, click on the Verify Your Identity button and then follow the instructions to verify your identity.
    Verify Your Identity to Restore OneDrive
  5. Then, on the Restore Page, select the date you want to revert to and then use the activity chart/feed to review the recent activities that you want to undo.
    Select the Date You Want to Revert Your OneDrive
  6. Now, select the activities you want to revert, and then click on the Restore button.
  7. Then wait for the completion of the process and hopefully, your deleted files are restored./

Solution 2: Check Your System’s Hard Disk for Bad Sectors

You may encounter the error at hand if your hard disk (or SD card, in case of a phone) is failing or has bad sectors (because it may reject the changes and revert to the default file system). In this context, running the ChkDsk command may solve the problem.

  1. Run the ChkDsk command on your system.
  2. Now, check if OneDrive is operating fine.

Solution 3: Update Windows and OneDrive Client of Your System to the Latest Build

Windows and OneDrive are updated regularly to add new features and patch their known bugs. Your OneDrive may not function properly if you are using an outdated version of Windows or OneDrive client. In this scenario, updating Windows and OneDrive may solve the problem.

  1. Update the Windows version of your PC to the latest build.
  2. Then, press Windows + Q keys to open the Windows Search bar and search for Control Panel. Now, in the results pulled by the search, open Control Panel.
    Open Control Panel
  3. Now, open Uninstall a Program (under Programs) and then select your OneDrive applicaiton.
  4. Then click on the Change button and in the How would you like to repair your Office programs window, select Online Repair.

    Click on Change After Selecting OneDrive
  5. Now click on the Repair button and then in the Ready to start an Online Repair window, click on the Repair button to start the process.
    Online Repair Office Installation
  6. After updating the OneDrive client and Windows, check if the file deletion issue is resolved.

Solution 4: Create a New User Account

You may encounter the error under discussion if your user account is corrupt. In this case, creating another user account on your system and using that account to sync to OneDrive may solve the problem.

  1. Unlink all your PCs from OneDrive as discussed in solution 1 (steps 1 to 4).
  2. Create another local admin user account and launch OneDrive.
  3. Now, use your credentials to login OneDrive and then check if the file deletion issue is resolved.

Solution 5: Reset the OneDrive Client to Defaults

Your OneDrive client may delete the files if it has a corrupt installation. In this case, resetting it to the defaults may solve the problem. But keep in mind that the reset process may take a while according to the data to be synced.

  1. Open the OneDrive folder in the File Explorer and backup your data/files to someplace safe.
  2. Press the Windows + Q keys to open the Search bar and type Command Prompt. Now, right-click on the Command Prompt (in the results pulled by the Windows Search) and select Run as Administrator.
    Run Command Prompt as Administrator
  3. Then, execute the following:
    %localappdata%\Microsoft\OneDrive\onedrive.exe /reset
    Reset OneDrive to Defaults
  4. If that command does not work, then execute the following:
    C:\Program Files (x86)\Microsoft OneDrive\onedrive.exe /reset
  5. Now, wait for two minutes and during this, keep an eye on the OneDrive icon in the system tray. If the icon does not disappear and then appear, execute the following:
    Launch OneDrive After Resetting it
  6. Now wait for re-syncing of all the data/files and then check if OneDrive is working fine.

If the issue persists, then either perform a clean install of the Windows on your system or try to use OneDrive on another PC. If the issue is still there, then you may have to use NAS storage with remote access or another cloud storage service (Google Drive, Dropbox, etc.).


Kevin Arrows

Kevin Arrows is a highly experienced and knowledgeable technology specialist with over a decade of industry experience. He holds a Microsoft Certified Technology Specialist (MCTS) certification and has a deep passion for staying up-to-date on the latest tech developments. Kevin has written extensively on a wide range of tech-related topics, showcasing his expertise and knowledge in areas such as software development, cybersecurity, and cloud computing. His contributions to the tech field have been widely recognized and respected by his peers, and he is highly regarded for his ability to explain complex technical concepts in a clear and concise manner.