Quick Answer

If you accidentally deleted a file, first stop writing new data to that drive, because every new operation can permanently overwrite the deleted data. Check the recycle bin or trash first, then backups and version history. For permanently deleted files, use recovery software. If the data is critical or the drive is failing, go to a professional lab.

What actually happens to a deleted file?

When you delete a file, or even permanently delete it (Shift+Delete), the computer does not physically wipe the file's contents at that moment. Instead it marks the file's space on the disk as "free and available." The data itself remains in that area for a while. This is precisely what makes recovering deleted files possible.

But this does not last forever. As soon as the operating system reuses that free space for a new file, it overwrites the old data, and from that point on your chances of recovery drop quickly. That is why the single most important rule in this guide is: do not panic and keep using the drive. Your odds of recovering a file are directly proportional to how little you do on that drive after deleting it.

Below, we start with the safest and easiest methods and move toward more advanced techniques. Always try the methods at the top of the list first.

1. Recycle bin and trash

This is the first and most harmless step. When you do a normal delete, the file usually does not vanish outright, it is moved to a holding area.

Recycle Bin on Windows

Double-click the Recycle Bin icon on your desktop. Find the file you want, right-click it and choose "Restore." The file returns to the folder it was in before deletion. If there are many items, use the search box at the top of the window or sort by "date deleted."

Trash on Mac

Click the Trash icon in the Dock. Find the file, right-click and choose "Put Back." The file returns to its original location.

If you deleted the file with Shift+Delete (Windows) or by emptying the trash, this step will not help. Do not worry, we move on to the next methods.

2. Windows: Previous Versions and File History

If enabled, Windows offers an extremely valuable feature: keeping previous versions of files and folders.

Previous Versions

Right-click the folder that contained the deleted file and choose "Restore previous versions." You will see snapshots the system took on earlier dates. Pick the right date, open the folder, and you can find and copy the deleted file from inside it.

This works if File History or System Protection (restore points) was enabled. If you never turned it on, unfortunately no previous versions may exist.

File History

If File History backup is configured to an external drive, open "File History" in Control Panel and choose "Restore personal files" to roll back to a file version from a specific date. This is ideal for personal folders like documents and photos.

3. Mac: Time Machine

For Mac users, Time Machine is the most reliable way to recover deleted files because it keeps regular, complete backups.

Connect your Time Machine backup disk. In Finder, open the folder where the deleted file should be. From the Time Machine icon in the menu bar, choose "Enter Time Machine." Use the timeline on the right to go to a date where the file still existed, select it, and press "Restore."

If Time Machine was never set up, this method will not work. In that case, see the next steps.

4. Cloud storage version history

If your files sync with a cloud service like OneDrive, Google Drive, or iCloud, this is often the easiest solution available to you. Cloud services keep their own trash for deleted files and also retain older versions.

OneDrive: In the web interface, check the "Recycle bin" on the left. Deleted files usually stay there for 30 days and restore with one click.

Google Drive: At drive.google.com, check the "Trash" section. You can also right-click a file and choose "Manage versions" to revert to older states of the file.

iCloud Drive: At iCloud.com, open "Recently Deleted." Deleted files are kept there for a limited time.

An important warning: cloud sync is a double-edged sword. If you delete a file on your computer, that deletion may propagate to the cloud too. However, thanks to the cloud's own trash, recovering the file from there is usually possible.

5. Recovery software for permanently deleted files

If none of the methods above worked, meaning the file is not in the recycle bin, there is no backup and no version history, it is time for recovery software. These tools scan the disk sector by sector and try to find traces of deleted files that have not yet been overwritten.

Two reputable, open-source tools are TestDisk and PhotoRec. PhotoRec is especially good at recovering common file types like photos, videos, and documents by recognizing their signatures. There are other recovery programs on the market as well.

But there are a few vital rules here, and if you break them you can lose the data completely instead of saving it.

THE BIGGEST RISK: Do it wrong and you permanently destroy the data

This section is the most critical part of this guide. Please read it carefully.

Rule 1: Stop writing to the disk immediately

A deleted file is recoverable only until new data is written over it. Continuing to use the disk (installing programs, downloading files, browsing the web, even the system working in the background) increases the risk of overwriting the deleted data. If the file is truly important, the safest move is to stop using that disk entirely. If it is the system's main drive (the C drive), it is best to shut the computer down and connect the disk to another computer if possible.

Rule 2: Do NOT install recovery software on the SAME disk

Installing the recovery program onto the very disk you are recovering from is a major mistake. The program's installation files can land right on top of the deleted data you want to recover. Always install and run the software from another disk, a USB stick, or a different computer.

Rule 3: Do NOT recover files back to the SAME disk

The software found the files and is restoring them. Never save those files to the same disk. Every write to the disk during recovery can overwrite other deleted files that have not yet been recovered. Always save recovered data to a separate destination (an external disk, a USB stick, another drive).

The SSD and TRIM reality

Here we must honestly state a hard truth. Modern SSDs (solid-state drives) use a mechanism called TRIM. When you delete a file, TRIM tells the drive "these cells are now empty, you may clear them," and the SSD usually erases that data physically within a very short time, often within seconds. This is designed to preserve SSD performance.

The result: on an SSD, the chance of recovering permanently deleted files is in most cases far lower than on classic mechanical disks, often close to zero. If TRIM is active, the deleted data is likely gone for good. A software scan is still worth a try, but keep your expectations realistic. We covered deleted files on SSDs in more detail here: Can deleted files be recovered on an SSD (TRIM).

Situation, method and success odds

The table below summarizes which method to try in each situation and your realistic expectation of success.

Situation First method to try Success odds
Normal delete (file in recycle bin) Restore from recycle bin Very high
Recycle bin emptied too (HDD) Previous versions, backup, recovery software Medium - high
Recycle bin emptied too (SSD, TRIM on) Recovery software (limited) Low
File synced to the cloud Cloud trash / version history High
Disk formatted Recovery software, better if quick format Medium
Disk physically failing or making noises Professional lab (do NOT DIY) Depends on lab

When should you go to a professional data recovery lab?

In some situations the right call is not to fight it yourself. Go straight to a professional lab when:

The data is critical and you cannot afford to lose it. If you have only one shot, do not waste it on an amateur attempt.

The disk is physically failing. If you hear clicking, knocking, or whirring sounds, the computer does not recognize the disk, or the disk does not spin at all, that is a physical fault. Trying to open the disk or force it with software increases the damage. Mechanical disks must be opened in dust-free controlled environments (clean rooms).

A software scan failed, or the disk degrades further during scanning. Scanning a failing disk over and over can drive it to complete death.

Why can home attempts make things worse? Because every failed attempt means new writes, extra heat, and additional mechanical wear on a failing disk. Professionals take a bit-for-bit copy (image) of the disk and work on that copy without touching the original. That is a safety net you do not have at home.

If you cannot decide which software to use, take a look at our comparison: best data recovery programs compared.

Frequently Asked Questions (FAQ)

Can permanently deleted (Shift+Delete) files be recovered?

Most of the time yes, but on one condition: not much new data must have been written to that disk after the deletion. If the data has not yet been overwritten, recovery software can bring it back. With SSDs and TRIM, the odds drop sharply.

I emptied the recycle bin too, is there still hope?

Yes, because the file may still be physically present on the disk. Stop writing to that disk immediately and run a scan with recovery software. On mechanical disks the odds are usually good.

Can I recover a deleted file on an SSD?

Usually it is very hard. The TRIM feature on SSDs quickly clears the physical cells of deleted data, and the data is often irreversibly lost within seconds. It is still worth a try, but keep expectations low.

I formatted the disk, are my files gone?

Not necessarily. Especially if a "quick format" was done, the old files often remain physically on the disk and can be found with recovery software. After a format, write no new data to that disk and scan it immediately. With a full (slow) format the odds drop a lot.

Can I recover deleted photos from my phone?

Most phones keep a "Recently Deleted" or "Trash" folder in the gallery app, and photos usually stay there for 30 days. Check there first. If you back up to the cloud (Google Photos, iCloud), you can recover from there too. Without those options, recovery at home is very difficult because of modern phones' encrypted storage, and professional help may be needed.

If you need help

DSET has provided data recovery services since 2003 at Ankara Hacettepe Teknokent Beytepe. Our data recovery success rate is 99.4 percent. The first diagnosis is free, and if no data is recovered there is no fee. If your disk is physically failing or the data is critical to you, reach out to us before you make it worse by trying yourself.

Phone: +90 536 662 38 09

For all our data recovery solutions: data recovery services.

Sources