When you delete a file from OneDrive, it goes to your OneDrive Recycle bin. You can recover accidental deletions from the Recycle Bin just as you would on a local computer.
To access the OneDrive Recycle Bin, simply click on the “Recycle bin” link on the left-hand-side of your OneDrive:
Then select the file you want to recover and click on the "Restore Selection" button.
If you have OneDrive synced with a local folder on your desktop (for access in Windows Explorer or OSX Finder), you can restore files directly to that folder from your local machine’s Recycle Bin (or Trash). They will then automatically sync back up with OneDrive as though it were a new file. If you are offline when you restore it to the local folder, the file will upload to OneDrive the next time you go online (the next time it syncs)!
TIP = You do not need to empty your OneDrive Recycle Bin periodically to recover storage space. Items in the Recycle Bin will be automatically removed from the Recycle Bin after 90 days. If 90 days has passed and a file that you need has been removed from the Recycle Bin, you can still recover it via the “second-stage recycle bin” link, where it will be recoverable for an additional 90 days.
After files are removed from the “second-stage recycle bin”, they are completely deleted and cannot be recovered. As with email, we do not recommend using the Recycle Bin as any sort of long-term storage solution.