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.

File recovery on a laptop screen

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.

The SSD Problem: Why Recovery Software Often Fails on Modern Laptops

Most recovery guides were written when computers used spinning hard drives, and on those drives the advice still works. When you delete a file on a hard drive, the operating system does not scrub the data away. It marks the space as available and leaves the actual bytes sitting there until something new is written over them. Recovery software scans for those bytes and rebuilds the file. That is why the first rule of recovery is always the same: stop using the drive the moment you realise a file is gone, because every new file you save can overwrite the one you want back.

Modern laptops mostly use SSDs instead, and SSDs behave differently. An SSD has a feature called TRIM, which keeps the drive fast by clearing deleted data quickly. When you delete a file on an SSD, the operating system tells the drive that the space is free, and the drive may erase the data within minutes, sometimes within seconds. Recovery software then finds nothing to recover, because there is nothing left to find. That is the main reason recovery attempts fail on modern laptops. If you deleted the file an hour ago and kept working, the odds are already poor. If you stopped using the machine at once, there is still a real chance.

There is one more mistake that ruins recoveries on both kinds of drive. People download and install the recovery software onto the same drive they are trying to recover from. The installation itself writes new data onto the drive and can overwrite the deleted file. Always install recovery software on a different drive, such as a USB stick, and save recovered files there too. Good tools are Recuva (free, Windows), Disk Drill (free scan, paid restore) and TestDisk with PhotoRec (free, open-source, Windows, Mac and Linux). If the drive itself is failing, such as a clicking hard drive or a laptop that will not boot, stop and call a professional service. No download can fix a hardware problem.

The Cloud Recycle Bin: The Check Most People Miss

Here is the check that saves more files than any recovery software. If the file lived in a synced folder, such as OneDrive, Google Drive, Dropbox or iCloud Drive, the file is probably not only on your computer. It is also in the cloud, and every one of those services keeps deleted files in an online recycle bin for around 30 days. That bin is separate from the one on your computer, so a file can be gone from your desktop and still be waiting in the cloud.

Check it before you touch any recovery software. For OneDrive, sign in through the browser at onedrive.live.com and open the Recycle Bin there. For Google Drive, open drive.google.com and look in Trash on the left-hand menu. For Dropbox, open dropbox.com and look for Deleted files. For iCloud Drive, sign in at icloud.com, open Drive, and check Recently Deleted. In each case, find the file and choose Restore. Paid plans sometimes keep deleted files for longer than 30 days. This check also works for files deleted from your phone, since phone photos and documents usually sync to the same cloud account.

Also check the version history in the cloud service. Google Drive, OneDrive and Dropbox keep earlier versions, so if you overwrote a document, you can often restore the earlier version. And remember: if you deleted a file from the cloud recycle bin itself, it is gone for good, so do not empty anything while you search.

Why does recovery software fail on SSDs?

SSDs use a feature called TRIM, which clears deleted data quickly to keep the drive fast. When you delete a file, the operating system tells the drive the space is free, and the drive may erase the data within minutes. Recovery software then has nothing to find. On an old hard drive, the bytes stay until something new overwrites them.

Can I recover a file from OneDrive or Google Drive after deleting it?

Yes, usually. OneDrive, Google Drive, Dropbox and iCloud Drive all keep deleted files in an online recycle bin for around 30 days, and paid plans sometimes keep them longer. Sign in through the browser, open the Recycle Bin or Trash, find the file and choose Restore. Check this before installing any recovery software.

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.