en
Back to Computer
Recycle bin with an arrow bringing back a document and a file restored message
Computer

Deleted Files: How to Recover Them on Windows, Mac and the Cloud

See where to look for a deleted file, in the right order, and how to restore it on Windows, Mac and the cloud with official tools from Microsoft, Apple and Google.

⚪ Intermediate Estimated time 10 minutes Step by step 10 ways

By

Quick answer: what to do now

Deleted a file by mistake? Do this in order:

  1. Stop saving and installing things on the computer: new files can overwrite the deleted one.
  2. If you just deleted it, press Ctrl + Z (on a Mac, Command + Z) in the folder.
  3. Open the Recycle Bin (Windows) or the Trash (Mac) and restore the file.
  4. If it was in OneDrive, Google Drive or iCloud, check the recycle bin on the website: files stay there for at least 30 days.
  5. Not there? Try previous versions, Time Machine or Windows File Recovery.

Where to look for a deleted file, in order

When a file is deleted, Windows only marks the space it used as free. According to Microsoft, the data can stay on the drive until it's overwritten by new files. So the sooner you act and the less you use the computer, the better your chances.

Where to look for a deleted file, in order: Recycle Bin or Trash, cloud recycle bin, previous versions and backups, Windows File Recovery and a data recovery service

Which case is yours?

How to recover deleted files: 10 ways, step by step

1Stop using the drive the file was on

Microsoft advises you to minimize or avoid using the computer to improve your chances: any use can create files that overwrite the free space.

  • Don't download or install recovery software on the same drive as the deleted file.
  • If the file was on a USB drive, memory card or external disk, unplug it until you try to recover it.
  • If possible, save recovered files to a different drive.

2Undo the deletion right away

If you just deleted it and you're still in the same folder, press Ctrl + Z in Windows File Explorer or Command + Z in the Mac Finder. The file goes back to where it was.

It's also worth searching for the name in Windows search or Mac Spotlight: sometimes the file was just moved to another folder.

3Restore from the Recycle Bin (Windows) or Trash (Mac)

Windows Recycle Bin with a file selected and the Restore option highlighted in the right-click menu, showing the original location and date deleted

Windows

  1. Open the Recycle Bin on the desktop.
  2. Use the Date deleted column to find the file.
  3. Right-click it and choose Restore. It goes back to its Original location.

Mac

  1. Click the Trash in the Dock.
  2. Find the file.
  3. Right-click it and choose Put Back.

Not in the Recycle Bin? Files deleted with Shift + Delete, files on USB drives, memory cards and network folders, and files too large for the Recycle Bin are deleted directly. In those cases, skip to steps 5 to 8.

4Check the cloud recycle bin

If the file was in a synced folder, it may be in the service's recycle bin even after disappearing from the computer.

  • OneDrive: sign in to the OneDrive website and open the Recycle bin. Microsoft keeps items for 30 days on personal accounts and 93 days on work or school accounts (unless an admin changed it). Microsoft 365 subscribers can also restore their entire OneDrive to an earlier date.
  • Google Drive: open Trash in the menu, right-click the file and choose Restore. Items are deleted forever after 30 days.
  • iCloud Drive: look in Recently Deleted on iCloud.com or in the Files app; Apple keeps files for 30 days. If they aren't there, Apple suggests checking Data Recovery on iCloud.com.

Files that were online-only and deleted from the website don't appear in the computer's Recycle Bin: look only in the service's recycle bin.

5Restore a previous version of the folder (Windows)

Windows Documents folder Properties window with the Previous Versions tab open, a version from before the deletion selected and the Restore button highlighted

This works if File History was turned on before you deleted the file.

  1. In File Explorer, right-click the folder where the file was and choose Restore previous versions (or Properties › Previous Versions).
  2. Pick a version from before the deletion. Microsoft's example: if you deleted it today, choose yesterday's.
  3. Click Open to check it and copy only the file you need.
  4. Prefer Restore to…: the Restore button replaces the current folder, and that can't be undone.

6Restore with Time Machine (Mac)

If you back up to a drive with Time Machine:

  1. Connect the backup drive and open the folder where the file was in Finder.
  2. Open Time Machine from the menu bar or Spotlight.
  3. Use the arrows or timeline to go back to a date before the deletion.
  4. Select the file and click Restore.

7Use Windows File Recovery

Windows File Recovery window with the command winfr C: E: /regular /n *.docx /n *.pdf and tips: save to another drive, stop using the PC and know that recovery is harder on SSDs

It's a free Microsoft app for recovering files deleted from internal drives, external disks and USB drives when they aren't in the Recycle Bin or a backup. It doesn't work for cloud storage or network shares.

  1. Install Windows File Recovery from the Microsoft Store, ideally with a USB drive or external disk connected to receive the files.
  2. Open the app from Windows search and select Yes to allow it.
  3. Type the command in the format winfr source: destination: /mode /n filter. The source and destination must be different drives.
  4. Example to recover Word and PDF documents from drive C: to drive E:
    winfr C: E: /regular /n *.docx /n *.pdf
  5. Type Y to start. Files go to a Recovery_date_time folder on the destination drive.

Use /regular for files deleted recently from NTFS drives. Use /extensive if you deleted them a while ago, the drive was formatted or damaged, or it's a USB drive or card (FAT/exFAT).

SSD: on most computers with an SSD, the TRIM feature clears deleted blocks shortly after deletion. That's why recovery on an SSD often doesn't work, and the Recycle Bin, cloud and backups are your best chances.

8Files deleted from a USB drive or memory card

  • Stop writing to the USB drive or card and unplug it.
  • On Windows, use Windows File Recovery in /extensive mode, saving to another drive. Example for a card on drive F:
    winfr F: C: /extensive /n *.jpg /n *.mp4
  • Don't format the drive if Windows asks you to: that lowers your chances.
  • The USB drive doesn't even show up? See USB flash drive not showing up and computer not recognizing USB.

9Check other places the file might be

  • Email and chat attachments: search for the file name in your email, WhatsApp Web or Teams.
  • Windows.old folder: if files disappeared after a Windows upgrade, Microsoft explains you can recover them from C:\Windows.old\Users for only 10 days.
  • Unsaved Office documents: in Word, Excel or PowerPoint, open File › Info › Manage Document › Recover Unsaved Documents.
  • Another computer or your phone: there may be a copy on another device or in your phone's backup.

10When to use a data recovery service

  • The hard drive makes clicking noises, isn't recognized or was dropped.
  • The drive was formatted, or the file is very important and the attempts above failed.
  • Turn the device off and don't open the drive: dust and handling can ruin it for good.
  • Choose companies with their own lab that diagnose before charging and guarantee data confidentiality.

How long you have to recover

Time limit to recover deleted files in each place
WhereTime limitHow to restore
Windows Recycle BinUntil emptied or the bin fills upRight-click › Restore
Mac TrashUntil emptied (or 30 days, if automatic removal is on)Right-click › Put Back
OneDrive30 days (personal) or 93 days (work/school)Website › Recycle bin › Restore
Google Drive30 daysTrash › Restore
iCloud Drive30 daysRecently Deleted › Recover
Windows.old10 days after the upgradeCopy from C:\Windows.old\Users
Drive, no backupUntil overwritten (often quickly on SSDs)Windows File Recovery

How to avoid losing files again

  • Turn on File History or Windows Backup on Windows and Time Machine on Mac, with an external drive.
  • Keep important documents in a folder synced with OneDrive, Google Drive or iCloud Drive.
  • Follow the 3-2-1 rule: 3 copies, on 2 types of media, with 1 off-site (for example, in the cloud).
  • Avoid Shift + Delete and check what you're deleting before emptying the Recycle Bin.
  • Use a phone too? See how to back up your phone.

Frequently asked questions

Can I recover files deleted from the Recycle Bin?

Sometimes. If you emptied the Recycle Bin, first check the cloud recycle bin and previous versions or backups. Without those, Windows File Recovery may find the file, especially on a hard drive and if the computer was barely used after the deletion.

How do I recover a file deleted with Shift + Delete?

Shift + Delete skips the Recycle Bin. Check the cloud recycle bin, use the folder's previous versions or Time Machine and, finally, Windows File Recovery, saving to another drive.

Do files deleted from a USB drive go to the Recycle Bin?

No. On Windows, files deleted from USB drives and memory cards are deleted directly. Stop using the drive and try Windows File Recovery in extensive mode.

How long do files stay in the OneDrive and Google Drive recycle bin?

In OneDrive, 30 days on personal accounts and 93 days on work or school accounts. In Google Drive, 30 days. In iCloud Drive, files stay in Recently Deleted for 30 days.

What is Windows File Recovery?

It's a free Microsoft app, available in the Microsoft Store, that searches for deleted files on internal drives, external disks, USB drives and cards. It runs in Command Prompt with the winfr command and must save files to a different drive from the source.

Can I recover deleted files from an SSD?

It's harder. On SSDs with TRIM turned on, the system clears deleted blocks shortly after deletion, and recovery software often finds nothing. That's why the Recycle Bin, cloud and backups are your best chances.

Are recovery programs safe?

Prefer Microsoft's official tool. If you use another program, download it only from the developer's official website and never install it on the same drive as the deleted file.

How do I recover deleted files on a Mac?

Open the Trash and use Put Back. If you emptied it, look in iCloud Drive's Recently Deleted or restore with Time Machine if you have a backup drive.

How do I recover an unsaved Word document?

In Word, open File › Info › Manage Document › Recover Unsaved Documents. If the file was in OneDrive, also check its version history.

When is it worth paying a recovery company?

When the hard drive makes noise, isn't recognized, was formatted, or the file is very important and the other attempts failed. Turn the device off and don't open the drive.

More practical solutions in Computer.

Sources

The screens in this guide are illustrations created by Fixfy to show the menu paths. Windows and OneDrive are trademarks of Microsoft; Mac, iCloud and Time Machine are trademarks of Apple Inc.; Google Drive is a trademark of Google LLC.