How to Recover Deleted Files: Proven Methods to Restore your Lost Data

Written by

recover deleted files

This article covers multiple effective data recovery methods that can be used to undelete deleted files on Mac and Windows. With the methods described below, you will be able to get back all your files without expert knowledge or professional help.

Use Case

Data loss is a major problem that has, at some point, affected nearly everyone. Every day, there are countless people on the internet desperately asking for advice on how to recover their deleted files. If you frequent sites like Twitter, Reddit, or Quora, posts like these may look familiar to you:

Hi everyone. One of my old HD’s died. It had thousands of pic that I can’t lose. Would you recommend any recovery tool that could save the files? or save the HD so that I can later access the pictures?

I have a hard drive which was stuck in a window boot cycle and after running various HDD tests showed bad sectors. I managed to hook the HDD up into linux box and see everything so I started copying folders across and the hard drive just went off.

I have a 1TB HD that has a lot of data on it. I had 3 hard drives plugged into my computer and formatted the wrong one.

If you’re reading this article, it means that you’re moving in the right direction, and it won’t take long before you know exactly how to recover your files, instead of desperately asking for help online.

Before We Start
Because of how modern operating systems handle file deletion, you can recover deleted files even if they are no longer present in the Recycle Bin or Trash. Just make sure to stop writing new data to the storage device on which the deleted files are located because you could accidentally overwrite them and make them unrecoverable.

Recover Deleted Files on Your Laptop and PC

From computer viruses to unreliable hardware components, there are many reasons why Windows users lose their data. Fortunately, there are just as many effective solutions, and this entire chapter is dedicated to them.

Recover Deleted Files from Recycle Bin (that Hasn’t Been Emptied)

You may be able to recover recently deleted files from your system’s Recycle Bin if it hasn’t been emptied yet. It’s always worth a look before going on to more elaborate repair efforts.

To manually restore files from the Recycle Bin:

  1. Open the Recycle bin by double-clicking or right-clicking and selecting Open.
  2. Choose the file or folder you want to recover.
  3. Right-click on the files and select Restore.

retrieve deleted files with recycle bin

If the Recycle Bin has been emptied since the files were deleted, you cannot recover with this method. Once a file is gone from the Recycle Bin, data recovery software is your best bet for restoring it.

Check the Temporary Storage

The Windows operating system and third-party Windows applications store some files in temporary storage, which is a special folder dedicated to files that are needed only for a limited amount of time. Sometimes, temporary files are stored on the hard drive only for a few seconds, but it’s fairly common for them to remain present on the drive for much longer.

The main temporary storage folder in Windows is C:\Windows\Temp.

Follow these steps to recover deleted files from the temporary storage folder:

  1. Open File Explorer.
  2. Navigate to C:\Windows\Temp.
  3. Look for your files and select the file you want to recover.
  4. Click the Copy to button in the toolbar and choose where you want to copy the file.

Recover files from temp folder

It’s worth noting that many applications keep temporary files in their App Data directories. Web browsers store temporary files in cache folders, which are identical in function to temporary storage folders.

Recover Files Using Undo Delete

There’s one easy solution to many seemingly disastrous data loss situations, and it involves the use of the Undo Shortcut (CTRL+Z). 

As you may know, Windows and most applications that are available for the operating system let you reverse your last action to an older state. The Undo Shortcut is commonly used in applications like Microsoft Word or Adobe Photoshop, but it can also be used in File Explorer to quickly recover a recently deleted file. 

All you need to do is press CTRL+Z on your keyboard with File Explorer selected. You may have to press the two keys more than once if you’ve performed multiple actions since you deleted the file. 

Warning: Closing File Explorer wipes clean the history of your actions, making it impossible for you to recover your files using the CTRL+Z shortcut.

Recover Deleted Data from the Previous Versions

If you have activated the File History feature, you might be able to restore a previous version of your file. To try this method, follow these steps:

  1. Open File Explorer.
  2. Navigate to the file or folder which contained the files that you wish to recover.
  3. Right-click and select Restore previous versions from the menu.
  4. Select the version you wish to recover from the list provided by Windows.
  5. Click the Restore button to recover your photo.

restore deleted files with Previous Versions

There needs to be a previous version of the file in order for this procedure to work. Newly created files may not be recoverable with this method.

Retrieve Deleted Files Using System Restore

Another way to undo a file deletion is by using Windows System Restore. Unfortunately, this method will not help you recover a personal document or images that you have created. It is used exclusively to restore your operating system to a previous state. If you are missing system files or experiencing OS problems, you can try to roll back to a previous place in time with System Restore.

To recover system files via System Restore:

  1. Open Control Panel.
  2. Click on System and Security.
  3. In the System and Security window click on System.
  4. Click on System Protection link.
  5. Click the System Restore button.find deleted files via system restore
  6. Select the restore point you want to use.
  7. Click Next and follow the prompts to start the restore.start system restore

As stated above, this will only affect system files.

Recover Deleted Files Using 3rd Party Data Recovery Software

If you haven’t been able to recover your deleted files using the methods described above, it’s time to enter the big league and use 3rd party data recovery software applications capable of recovering even permanently deleted files.

Paid Data Recovery Software: Disk Drill

Disk Drill is a leading data recovery software application for Windows and Mac. It can recover over 400 file formats from all common storage devices, including hard drives, USB flash drives, memory cards, and others.

Disk Drill exceptionally easy to use, and you don’t need to worry about potentially losing your data just by selecting the wrong option. Disk Drill lets you recover up to 500 MB for free, and you can unlock unlimited recovery with a purchase of a license.

To recover deleted files using Disk Drill:

  1. Download and install Disk Drill for Windows. Don’t use the disk that contained the files you wish to recover.
  2. Launch the application.restore deleted files
  3. Select the disk or partition from the list provided by the tool.
  4. Click the Search for lost data button to start the scanning algorithms that are used to find deleted to restore deleted files
  5. Browse the file list that Disk Drill displays to preview the files which can be recovered by the app.find deleted files
  6. Select the files to be recovered as well as a new storage location where they will be saved. Do not use the original location to avoid possible file corruption.retrieve deleted files
  7. Click the Recover button to recover the deleted data.recover deleted files

That’s all you need to do to recover lost files with this excellent utility. Disk Drill’s advanced Quick and Deep scanning procedures can undo file deletions and recover data that you thought was permanently deleted.

Free Data Recovery Software: PhotoRec

PhotoRec is arguably the best free data recovery software for Windows (it also supports Linux, FreeBDS, NetBSD, OpenBSD, Sun Solaris, and macOS). It’s completely free and open source, so you can use it to recover an unlimited amount of data from any storage device. 

Since this is a free software application, it probably won’t surprise you that it not nearly as easy to use as Disk Drill. In fact, PhotoRec is a command-line application that’s intended to be controlled using the keyboard. If you can get over this hurdle, PhotoRec can deliver surprisingly great results. 

To recover deleted files with PhotoRec:

  1. Download and install the PhotoRec. Don’t use the disk that contained the files you wish to recover.
  2. Extract the downloaded file archive.
  3. Launch the application by clicking on photorec_win.exe.
  4. Select the storage device you wish the scan using the arrow keys. Press Enter on your keyboard to proceed.
  5. Select the partition you wish to scan using the arrow keys. Press Enter to scan it.
  6. Select the right file system and press Enter. In most cases, PhotoRec automatically suggests the right option.
  7. Choose if you want to scan only unallocated space or the whole partition.
  8. Select a destination to save the recovered files to. Press C on your keyboard when done.

Photorec files recovery

There’s also a version of PhotoRec with a graphical user interface, called QPhotoRec, but it has some bugs that are not present in PhotoRec, which is why we don’t recommend it. If you need a graphical user interface to recover your lost files on Windows, use Disk Drill instead.

Is It Possible to Recover Deleted Files Using CMD?

The Windows command line is a powerful tool that can be used to recover files by correcting disk errors. It’s especially useful in situations where Windows believes that your storage device requires formatting because you can use a command-line tool called CHKDSK to verify its integrity and fix logical file system errors. If you want to learn more about CHKDSK, you can read this explanation by Microsoft.

To recover deleted files using CHKDSK:

  1. Press Windows + R, type CMD, and click OK.
  2. Enter the following command in the command prompt window (replace X with the letter assigned to the hard drive you want to fix) and press Enter: chkdsk X: /R
  3. Wait for CHKDSK to finish.

CHKDSK command

The /R parameter tells CHKDSK to checks the entire disk surface for bad sectors and repair them if possible.

What Is System Image and How Can It Help Restore Your Data?

A system image is a copy of the hard disk required for Windows to run (typically the C drive), and Microsoft explains how to create it here.

You can use a system image to restore your computer and your data if your hard drive fails. The biggest downside of restoring data from a system image is that you can’t choose individual items to restore.

To restore data using a system image in Windows:

  1. Open Start menu, type “settings,” and hit Enter on your keyboard.
  2. Select Update & Security and choose Recovery from the list of options on the left.
  3. Save your work and click the Restart now button under Advanced startup.
  4. Click Troubleshoot > Advanced Options > See more recovery option > System Image Recovery.
  5. Select a System Image backup file and click Next.
  6. Choose additional restore options and click Next.
  7. Review the system image details and click Finish to begin the restore process.

restore data using a system image

Keep in mind that restoring deleted data from a system image file can take a lot of time, and you won’t be able to use your computer during the process.

Recover Deleted Files on Mac

Macs are known for their reliability and ease of use, but that doesn’t their users are immune to data loss. Fortunately, there are many ways to recover deleted files on a Mac.

Recover Files from Trash (that Hasn’t Been Emptied)

Whenever you accidentally delete an important file, the first place where you should look for it is Trash, a temporary storage area for deleted files on macOS. 

To recover deleted files from Trash:

  1. Open Trash by clicking on its icon, located on the right side or bottom of the Dock.
  2. Go through Trash and look for the files you want to undelete.
  3. Select the files you want to recover by pressing and holding the command key and then clicking the files or holding the left mouse click and dragging the cursor around them.  
  4. Click on any of the selected files, hold the click, and drag your mouse to another folder or your desktop. As soon as you release the mouse, the files will be moved to the destination.

Put back files from trash

This method works only if you haven’t emptied Trash since deleting your files. If you have, you need to try other methods described in this article.

Check the Temporary Folder

There are multiple temporary folders on macOS used by the operating system and various applications to store files for a limited amount of time. These folders are not intended to be readily accessed by users, but knowing how to do so can be useful for data recovery purposes. 

To check the temporary folder on macOS:

  1. Open the Terminal application.
  2. Type: open $TMPDIR
  3. Hit Enter on your keyboard.
  4. Go through the temporary folder and look for the deleted files. You can also use the Search feature if you remember the name of the deleted file.
  5. Copy any files you want to recover from the temporary folder to your desktop or any other suitable folder.

Recover files from temporary folder mac

Other temporary folders on macOS that you should check include /tmp and ~/Library/Caches/TemporaryItems/.

Recover files using Time Machine Backup

Since 2008, all Macs come with a useful data backup tool called Time Machine, which is capable of creating incremental backups of files that can be restored at a later date. If you’ve activated Time Machine in the past, you’re in luck because it takes just a few clicks to recover deleted files with it. If not, we highly recommend you activate Time Machine now because it’s better to do it late than never.

To recover files using a Time Machine backup:

  1. Connect your Time Machine backup disk to your Mac.
  2. Open the folder that contained the deleted files.
  3. Click the Time Machine icon located in the Menu Bar and choose Enter Time Machine.
  4. Locate the files you want to recover using the timeline on the right edge of the screen.
  5. Click Restore to restore the selected file.

Restore files from time machine backup

Time Machine keeps creating backups until the backup disk runs out of available storage space, which is when it deletes the oldest weekly backup.

Use 3rd Party Software

No luck yet? Then you need to use third-party data recovery software. We recommend Disk Drill for Mac because of its native user interface, powerful data recovery algorithms, and one-click approach to data recovery. With Disk Drill for Mac, you can preview all recoverable files for free and get them back without any expert knowledge.

To recover deleted files using Disk Drill for Mac:

  1. Download and install Disk Drill for Mac. Don’t use the disk that contained the files you wish to recover.
  2. Launch the application.
  3. Click the Search for lost databutton next to the drive on which your files were stored prior to deletion.Start searching for lost data
  4. Wait until Disk Drill finishes analyzing the drive.Scanning process in Disk Drill
  5. Look inside the recovery folders and locate the deleted files with the help of the preview feature.Preview the files
  6. Select each file you want to recover and click the Recover button.
  7. Specify where you want Disk Drill to recover the deleted files and click Choose.Choose recovery destination

Included with Disk Drill for Mac are useful data backup tools that you can use to avoid losing important files ever again.

Is It Possible to Recover Deleted Files Using Mac Terminal?

While not the most convenient data recovery method, Mac users can recover deleted files from Trash using Terminal. We recommend you use this method only if your Mac is unbootable, and you can’t recover deleted files from Trash the traditional way. 

To recover deleted files using Terminal:

  1. Launch the Terminal app.
  2. Type cd .Trash and hit Enter. This command will take you to the Trash folder.
  3. Type ls and hit Enter. This command will display all files inside the Trash folder.
  4. Type mv <filename> <destination> to move the file to another location.
  5. Quit the Terminal app.

Find deleted files using terminal

If you haven’t been able to find your deleted files in the Trash folder, it means they’re permanently deleted. In that case, you can either recover them using data recovery software or restore them from a backup.

What Is OS X Recovery Mode and How Can It Help Recover Files?

From a corrupted system file a malware infection to a major user error, there are many reasons why you Mac may not boot properly. When that happens, you can’t use the usual tools and techniques to recover your files. You could, of course, remove the hard drive a connect it to another Mac, but there’s a good chance that you’ll be able to fix the underlying issue using the Recovery Mode function

Recovery Mode is a special boot mode that loads only essential recovery tools, allowing you to fix disk issues, restore from a Time Machine backup, or reinstall your macOS. 

To access Recovery Mode:

  1. Shut down your Mac.
  2. Hold down the Command key + R while it starts
  3. Release the key combination when you see the Apple logo or spinning globe.
  4. Enter your admin password if prompted.
  5. Pick any option from the macOS Utilities window.

Options in mac utilities

To exit Recovery Mode, click the Apple icon in the top-left corner and select Restart or Shut Down.


Bonus: Recover Deleted Files on the Mobile Phone

More people than ever store valuable files on their mobile devices, making Android and iPhone recovery an important topic.

How to Recover Deleted Files on Android

Losing important files on Android isn’t the end of the world because deleted files on Android devices are not truly gone until they are overwritten. What’s more, Android users can take advantage of many backup solutions to prevent data loss in the first place.

Option 1: Google Photos Backup

Android users can safely backup their photos using Google Photos, a photo sharing and storage service developed by Google. When you activate the backup feature in Google Photos, the app will automatically back up all photos on your Android device to Google’s servers, allowing you to access and recover them from any device.

To recover deleted photos on Android using Google Photos:

  1. Open the Google Photos app on your Android device.
  2. Select the deleted photos.
  3. Tap More (three dots) and select Save to device.

Recover files from Google Photos

Still looking for your photos? Tap Menu > Trash in the top-left corner and select the photo you want to recover. Click Restore to get it back. Keep in mind that deleted photos only stay in Trash for 60 days.

Option 2: Android Recovery Software

If you need to recover other data besides photos, Google Photos won’t be able to help you. What you need is a full-fledged Android recovery software application like Disk Drill. 

To recover deleted files on Android using Disk Drill:

  1. Download and install Disk Drill.
  2. Connect your Android device to your Mac computer.
  3. Enable Mass Storage mode on your Android device.
  4. Launch Disk Drill and click Search for lost data button.
  5. Select which files you wish to recover and save them to your computer.

Recover Android files with Disk Drill

If your Android device doesn’t support Mass Storage Mode, you will need to root it before your lost data can be retrieved.

How to Recover Deleted Files on iPhone

Recovering deleted files on an iPhone isn’t nearly as big of a challenge as it may seem considering Apple’s walled-garden philosophy.

Option 1: iPhone Backup

Backing up important data on a regular basis pays off. If you’ve been diligently creating local backups of your iPhone, you can easily recover it straight from Finder.

To recover deleted files from an iPhone backup:

  1. Launch Finder.
  2. Connect your iPhone to your computer.
  3. Select your iPhone from the list of locations on the left.
  4. Click the Restore iPhone button located in the General tab.
  5. Click the Restore button to confirm that you’re ready to restore your iPhone from a backup.

restore your iPhone from a backup

These instructions are intended only for macOS Catalina and newer. If you still use an older version of macOS, you can recover your data from an iTunes backup, and the process is mostly the same.

Option 2: iPhone Recovery Software

If you don’t have a backup of your iPhone, don’t despair! You can still recover your data using iPhone recovery software like Disk Drill.

To recover deleted files from an iPhone using Disk Drill:

  1. Download and install Disk Drill.
  2. Connect your iPhone to a Mac. Select “Yes” and enter the unlocking code if asked if you want to trust the computer.
  3. Launch Disk Drill and click Search for lost data.
  4. Enter the iPhone’s encryption password if asked for it.
  5. Review the found files and select what data you want to restore.
  6. Either click the Recover button in the top-right corner or click Mount found items as disk in the bottom-left corner.

Recover deleted files from iphone

What Happens When You Delete Files on Mac and Windows?

When you delete a file on Mac or Windows, the operating system simply removes all references to it, making it inaccessible. However, the file still physically remains on the hard drive, and you can use data recovery software to make it accessible again. 

The more a specific disk is used after files are deleted, the greater the chance that the erased files will be overwritten. For this reason, you need to stop using the storage media that contained the deleted files or images as soon as you realize that you may need to perform data recovery. At some point, the OS will reclaim the space and make it impossible to recover the data in question.

Main Reasons for Data Loss

In April 2020, CleverFiles conducted a data recovery survey to discover the main reasons for data loss, among other things. Here are the results: 

  • Hardware failure (20%)
  • System malfunction (20%)
  • Accidental files deletion (19%)
  • Device loss (13%)
  • Formatting (8%)
  • Mechanical damage (7%)
  • Computer virus or malware (6%)
  • Other reasons (8%)

The good news is that data recovery software can deal with most of these data loss scenarios. The only exception is mechanical damage.

When Does It Make Sense to Visit an Offline Data Recovery Service?

As we’ve hinted at in the paragraph above, offline data recovery services make sense when you need to recover data from a mechanically damaged storage device

Such device may be unreadable due to a head crash, electrical failure, or the ingress of water or dust. To repair the damage and make them readable again, it’s necessary to have access to clean room and professional equipment—neither of which is something regular home users have at their disposal. 

What’s more, most storage device repair jobs require a lot of precision and experience, since even the smallest mistake can easily cause permanent loss of all data on the device. Even if you’re skilled and know what you’re doing, performing a DIY repair would void the original warranty and potentially cost you money down the road. 

If you decide to go this route, we recommend you select a trusted data recovery service with many years of experience and positive online reviews, such as ACE Data Recovery Service or Data recovery services by Ontrack.

Why Is It Important to Make Regular Data Backups?

Regular data backups are important because they are often the only guaranteed way to safe important files after a system crash or hard drive failure. By making regular backups of your important files, you gain the ability to easily revert to their previously backed-up versions and continue working as if nothing had happened at all.

Here are three data backup tips to help you take your backup strategy to the next level:

  • Label removable storage devices: Preventing accidental deletion can be a problem if you use a large number of flash drives or other removable storage. You may not readily recollect which files are on a particular drive and mistakenly format one so you can use it for another purpose. Meaningful labels can help avoid this issue.
  • Create byte-to-byte backups: With byte-to-byte backups, you can save the content of an entire storage device, such as a hard drive or USB flash drive, as a disk image. Byte-to-byte backups are especially useful when backing up system drives because they let you restore all your data, applications, and settings. You can easily create byte-to-byte backups using Disk Drill.
  • Back up your data to the cloud: There are many free cloud backup services that give its users a lot of free storage space, so why not take advantage of them? Dropbox, Google Drive, Mega, and Microsoft OneDrive all offer real-time data backups and the ability to keep your files synchronized between devices, making them an excellent addition to your data backup strategy.
David Morelo is a professional content writer in the technology niche, covering everything from consumer products to emerging technologies and their cross-industry application.
Approved by
12 years experience in software development, database administration and hardware repair.