How to Recover Deleted Files on Windows and Mac

Person searching for a file on a laptop file explorer

Deleting a file rarely erases it immediately. Both Windows and Mac move deleted files to a holding area first, and even after that is emptied, the underlying data often remains recoverable until something else overwrites it. The single most important rule: stop saving new files to that drive immediately, since every new file you save risks overwriting the very data you are trying to recover.

Windows: Check the Recycle Bin First

Open the Recycle Bin on your desktop, find the file, right-click it and select Restore. This returns it to its original location instantly and works for the vast majority of accidental deletions, provided the bin has not been emptied since.

Windows: Restore Previous Versions

If the Recycle Bin has already been emptied, navigate to the folder that used to contain the file in File Explorer, right-click the folder itself, and select Restore previous versions. This uses Windows File History, if enabled, to show earlier snapshots of that folder’s contents, letting you pull back a version containing the missing file.

Windows: Windows File Recovery for Permanently Deleted Files

For files gone from both the Recycle Bin and File History, download Windows File Recovery from the Microsoft Store, then run it through Windows Terminal using a command in this format: winfr C: E: /regular /n *.pdf, replacing the drive letters and file type as needed. This scans the drive directly for recoverable file traces, working best the sooner it is run after deletion.

Mac: Check the Trash First

Open the Trash from the Dock, find the file, then either drag it to the desktop or right-click and select Put Back to return it to its original folder. Mac typically keeps deleted files in the Trash for around 30 days before automatic removal, though this varies by system settings.

Mac: Restore From Time Machine

If Time Machine backups are enabled, connect the backup drive, open the folder that used to contain the file in Finder, then launch Time Machine and use the on-screen arrows to browse back to a date when the file existed. Press the space bar to preview a file before restoring it, then click Restore to bring it back.

Mac: Recover From iCloud Drive

If the file was stored in iCloud Drive, sign in at icloud.com, open Drive, and check whether the deleted file appears in its own recently deleted section, which typically retains files for a limited window after deletion, separate from the local Mac Trash.

Last Resort: Data Recovery Software

If none of the built-in options work, dedicated data recovery software can scan a drive at a lower level to find file traces that standard tools cannot see. This works best when run as soon as possible after deletion, on a drive that has had minimal additional writing since the file was lost.

Preventing This Next Time

  • Enable File History on Windows through Settings, then Update & Security, then Backup, so previous versions of your folders are always available.
  • Enable Time Machine on Mac with an external drive connected regularly, so a recent backup always exists.
  • Turn on version history in cloud storage such as Google Drive, Dropbox or OneDrive, which lets you revert individual files to an earlier state independently of your local backups.

Frequently Asked Questions

Can I recover a file after emptying the Recycle Bin or Trash?

Often yes, particularly if you act quickly. File History or Time Machine backups can restore it if enabled, and dedicated data recovery software can sometimes retrieve it directly from the drive even without a backup, provided the space has not been overwritten.

What should I do immediately after accidentally deleting an important file?

Stop saving new files to that drive immediately. Every new file written to the drive increases the risk of permanently overwriting the deleted file’s data before you can recover it.

How long do deleted files stay in the Mac Trash?

Typically around 30 days by default, though this can vary depending on system storage settings, after which macOS may automatically empty older items to free up space.

Do I need special software to recover deleted files?

Not always. Built-in tools such as the Recycle Bin, Trash, File History and Time Machine recover most everyday accidental deletions. Dedicated recovery software becomes necessary mainly when a file is permanently gone from all of these options.

Does Windows File Recovery work on any type of drive?

It works on most standard NTFS, FAT and exFAT drives, though success rates vary depending on drive type and how much has been written to the drive since deletion, with solid-state drives sometimes being harder to recover from due to how they manage deleted data internally.

Want to avoid this next time? Read our guide on best cloud storage services or browse Software & Apps for more guides.