How to recover a deleted file on a computer
Learn where deleted files go on a computer and how to restore them from the trash, backups or version history, plus what to do quickly to improve the chances of recovery.
A file deleted by mistake is usually recoverable if you act quickly. When you delete a file, most systems do not erase its contents right away. They remove the file's entry from the folder and mark the space as available. The data stays on the disk until new information overwrites it. That is why the first rule of recovery is to stop using the computer for anything that writes new data, and the second is to check the easiest places first before trying anything more involved.
Start with the trash or recycle bin. Files deleted from the desktop or from a folder in the usual way usually move there, and they remain until you empty the bin. Open it, search for the file name, and restore it to its original location. Keep in mind that the bin has a size limit on many systems, and older items may be removed automatically when space runs low. If the file is not there, check whether it was deleted from a network drive, an external drive or a cloud folder, because those locations may use a separate trash folder or none at all.
Restore from the system's backup
If the trash does not hold the file, look at the computer's built-in backup feature. Most desktop operating systems include a backup tool that copies files on a schedule to an external drive or a network location. Open the backup application and browse for the folder that held the file. Choose a date before the deletion, and restore the file to a new location first, so you do not overwrite a newer version by accident. Backup tools often keep several versions, so you can compare them and pick the one you need.
Check any cloud storage the computer syncs with as well. Cloud drives keep deleted files in their own trash for a set period, which varies by service. Sign in through the service's website and look in the trash section. Some services also keep previous versions of documents, which can help if the file still exists but its recent changes were lost. Restoring from the cloud is often the simplest route for documents created on a phone or a laptop that syncs automatically.
Use version history for documents
Many document programs and cloud services keep version history, which records earlier saves of a file. If you overwrote a file rather than deleting it, a previous version may still be available. Open the file's menu, look for a version history or revision option, and review the list of saved versions with their dates. Choose the one from just before the damage occurred and save it as a new file so the current version is preserved. This approach works best for word processing documents, spreadsheets and presentations, since those programs often save revisions automatically.
Folder-level history is also available on some systems. A feature that shows earlier versions of a folder lets you restore an entire folder to a previous state, which is useful when several files were deleted or changed together. Use it carefully, because restoring an older version of a folder can replace newer files that you still need.
Recovery software and what to avoid
If none of these options work, recovery software can scan the disk for data that has been removed from the folder structure. Such programs can be effective, but they work best when run soon after deletion and when the recovered file is saved to a different drive. Write the recovered files to an external drive, never back to the drive you are recovering from, because saving data to the same drive can overwrite the very information you are trying to recover. Choose a reputable program from the software publisher's official site, and be wary of free tools that ask you to pay for the results or install bundled software.
Avoid repeated attempts that write to the disk. Do not install new programs, download large files or run disk optimization tools on the drive that held the deleted file. Each action can overwrite recoverable data. If the file is important and the built-in options have failed, a data recovery service can attempt more advanced recovery, particularly when a drive is physically damaged. Expect such services to cost money and to offer no guarantee of success.
Recovery options, from easiest to hardest
- Check the trash or recycle bin and restore the file if it is there.
- Open the system backup tool and restore a copy from before the deletion to a new location.
- Sign in to any cloud storage and check its trash and previous versions.
- Review version history in the document program or cloud service.
- If all else fails, use recovery software that writes results to a separate drive.
- Consider a professional recovery service for important files on a damaged drive.
The most useful habit is to prepare before a deletion happens. Turn on automatic backups, keep important documents in a synced folder, and check that version history is enabled. Confirm that a backup has run recently and that your trash settings keep items long enough to be useful, so a future mistake takes minutes to fix rather than hours.