ThisCalculator

Everyday

OneDrive File Recovery: How to Restore Deleted Files

Updated · Standard formula, shown below

The calculator for this page is switched off while it is checked. The formula is below, and the worked example in the article shows how to use it by hand.

OneDrive File Recovery: How to Restore Deleted Files

OneDrive file recovery lets you restore files you deleted or that were overwritten, using the built-in recycle bin and version history. You can recover most deleted files within 30 days (or longer if you have a Microsoft 365 subscription), and you can also restore an entire OneDrive to a previous point in time. This article explains exactly how to recover files, what your options are, and what to do when recovery seems impossible.

How OneDrive Deletion Works

When you delete a file in OneDrive, it doesn’t disappear instantly. It moves to the OneDrive recycle bin, where it stays for a set period. For personal accounts, that’s 30 days by default. For work or school accounts, an admin can set the retention period anywhere from 1 to 93 days. After that, the file is purged and cannot be recovered through the recycle bin.

If you delete a file from your computer’s OneDrive folder, it also goes to your computer’s local recycle bin first. Only when you empty that does it move to the OneDrive recycle bin. This two-step process often confuses people: they think a file is gone forever when it’s actually still in one of two places.

Restoring from the OneDrive Recycle Bin

The most common recovery path is the recycle bin. Here’s how to use it:

  1. Sign in to onedrive.com with your Microsoft account.
  2. In the left navigation, select Recycle bin.
  3. Find the file or folder you want. You can search or sort by deletion date.
  4. Select the item(s) and click Restore.

Restored files return to their original location. If the original folder was also deleted, OneDrive recreates it. If a file with the same name already exists, OneDrive asks you to keep both or replace.

For files deleted from a shared folder, the recycle bin of the folder owner holds them. If you don’t have access to that owner’s recycle bin, you’ll need to contact them.

Using Version History for Overwritten Files

If you didn’t delete a file but accidentally overwrote it with an older version, version history is your friend. OneDrive automatically keeps previous versions of files for up to 30 days (for personal accounts) or longer for work/school. To restore a previous version:

  1. Right-click the file in OneDrive (on the web or in File Explorer) and select Version history.
  2. You’ll see a list of saved versions with timestamps.
  3. Select the version you want and click Restore.

This works for Office documents, PDFs, images, and most other file types. Version history is especially useful when you save a file multiple times and realize you need an earlier draft.

Restoring an Entire OneDrive

If you’ve had a ransomware attack, mass deletion, or accidental sync error, you can roll back your whole OneDrive to a previous point. Microsoft 365 subscribers can use the Restore your OneDrive feature:

  1. Go to OneDrive settings (gear icon) > Options > Restore your OneDrive.
  2. Choose a date and time to restore to (up to 30 days back).
  3. Review the changes and confirm.

This restores all files, folders, and permissions to that moment. It doesn’t affect anything created after that time—those files remain. This feature is a lifesaver for ransomware recovery but be careful: it overwrites current versions with older ones, so any changes made after the restore point will be lost.

When Files Are Gone: Second Recycle Bin and Admin Options

For work or school accounts, there’s a second recycle bin at the SharePoint admin level. If the user’s recycle bin has been emptied, an admin can still recover files from the Site Collection Recycle Bin (also called the second-stage recycle bin). This holds items for another 93 days after the first bin is emptied. Only admins can access this, so you’d need to contact your IT department.

For personal accounts, there’s no second stage. Once the 30-day recycle bin period ends, the file is permanently deleted. However, if you have Microsoft 365, you can sometimes recover files from the Microsoft 365 admin center if you were the admin, but this is rare and time-limited.

Common Problems and Misconceptions

One common misconception is that deleting a file from OneDrive on your phone also deletes it from the cloud immediately. It doesn’t—it goes to the recycle bin just like any other deletion. Another is that the recycle bin is unlimited; it’s not, and large files may be purged earlier if the bin exceeds its size limit.

Another issue: if you delete a file from a shared folder, it goes to the folder owner’s recycle bin, not yours. If you don’t have permission to see that bin, you can’t restore it yourself.

Also, OneDrive sync issues can cause files to disappear from your local folder but still exist in the cloud. Always check the web version before assuming a file is lost.

How to Avoid Losing Files in the Future

Prevention is better than recovery. Here are practical steps:

  • Enable Files On-Demand—this keeps files in the cloud and only downloads them when needed, reducing accidental local deletions.
  • Use the recycle bin regularly—don’t empty it out of habit; let items age out naturally.
  • Set up version history—it’s automatic, but you can increase the number of versions kept in some admin settings.
  • Back up important files elsewhere—a second cloud service or an external drive gives you a fallback.
  • Check the recycle bin before panicking—most “lost” files are there.

Frequently Asked Questions

How long does OneDrive keep deleted files?

For personal accounts, deleted files stay in the recycle bin for 30 days. For work or school accounts, an admin can set this from 1 to 93 days. After that, they’re permanently deleted and cannot be recovered through OneDrive.

Can I recover a file that was deleted from the recycle bin?

If you emptied the recycle bin, the file is gone for personal accounts. For work/school accounts, an admin might still recover it from the second-stage recycle bin within 93 days. After that, no.

Does OneDrive keep versions of files automatically?

Yes, OneDrive automatically saves previous versions of Office documents and many other file types. You can access them via the Version history option. Versions are kept for up to 30 days for personal accounts, but the exact number depends on file type and activity.

What happens when I restore a file that was in a deleted folder?

OneDrive recreates the original folder structure and places the file back in its original location. If the folder name is already taken, it may add a suffix.

Can I recover a file that was overwritten by a sync conflict?

Yes, if a sync conflict creates a copy like “file (1).docx”, the original is still there. If it’s truly overwritten, use Version history to restore the earlier version. Sync conflicts usually don’t delete data—they create duplicates.

Is there a way to recover a file after 30 days?

For personal accounts, no. For work/school, an admin might have set a longer retention period, or the file might still be in the second-stage recycle bin. Otherwise, you’d need a backup from before the deletion.

Related

Formula used
in t | Days since deletion | days | 10 | 0
in d | File size | MB | 5 | 0
out r | Recoverable? | - | (t  30) * 0 | 0
out s | Size in GB | GB | d / 1024 | 2

Each line is one input (in, sel, list) or one result (out: label, unit, formula, decimals). How the calculators work

Method: the standard formula for this calculation, rounded as each result states. See how the calculators work or report an error.