keepcalculator

06 Numbers and Powers

Undo Trash Delete: Recover Files & Photos

Card No. 06·65740 · Updated · Standard formula, shown below

If you deleted a file and it went to the Trash (or Recycle Bin), you can usually undo the delete by opening the Trash, selecting the item, and choosing “Restore.” This works for files deleted from your computer’s internal drive, as long as you haven’t emptied the Trash since. For files deleted from a USB drive, network drive, or already emptied from the Trash, recovery is still possible but requires different steps or third-party software.

How the Trash / Recycle Bin Actually Works

When you delete a file normally (by pressing Delete or right-clicking “Delete”), the operating system does not erase the data. Instead, it moves the file to a hidden folder called Trash (macOS, Linux) or Recycle Bin (Windows). The file’s directory entry is marked as deleted, but the actual bytes remain on the disk until the Trash is emptied or the space is overwritten.

This is why “undoing” a trash delete is usually just a matter of restoring the file from the Trash. The file is still fully intact; only its location has changed.

Step-by-Step: Undo Deletion from Trash

Here’s how to restore a file from the Trash on the three major operating systems:

  • Windows 10/11: Open the Recycle Bin by double-clicking its desktop icon. Locate the file, right-click it, and select Restore. The file returns to its original folder. You can also select multiple files and click the “Restore the selected items” button in the toolbar.
  • macOS: Open the Trash from the Dock. Find the file, right-click (or Control-click) it, and choose Put Back. The file goes back to its original location. If the original folder no longer exists, macOS recreates it.
  • Linux (GNOME Files/Nautilus): Open the Trash from the sidebar in the file manager. Right-click the file and select Restore from Trash. The file moves back to its original folder.

What If the Trash Was Emptied?

Once you empty the Trash, the file’s directory entry is removed, and the space is marked as available. The data is still physically on the drive, but the operating system no longer knows where it is. Recovery now depends on third-party software that scans the raw drive for file signatures (e.g., JPEG headers, PDF headers).

Key factors that affect recovery success:

  • Time since deletion: The sooner you attempt recovery, the better. Every new file written to the drive can overwrite the deleted file’s blocks.
  • Drive type: HDDs are more recoverable because they write sequentially. SSDs use TRIM, which immediately erases deleted blocks, making recovery nearly impossible after a few minutes.
  • Usage after deletion: Avoid writing any new data to the drive. Do not install recovery software on the same drive; use a different drive or a USB bootable tool.

Common Recovery Software and Their Limits

Several free and paid tools can scan for deleted files. Popular names include Recuva (Windows), PhotoRec (cross-platform), and TestDisk (cross-platform). These tools work by reading raw sectors and matching file signatures.

Limitations to know:

  • Recovered files often lose their original filenames and folder structure. You’ll get a list of files like “file0001.jpg”.
  • Files that were fragmented (stored in non-contiguous blocks) may be partially recoverable or corrupted.
  • On SSDs with TRIM enabled, recovery is usually impossible after the TRIM command runs (typically within seconds to minutes).
  • Free versions often have file size limits or lack advanced features like deep scanning.

Prevention: Better Than Recovery

Recovery is never 100% reliable. The best strategy is to avoid permanent loss in the first place:

  • Use versioning or backup tools: Windows File History, macOS Time Machine, or cloud storage like Google Drive/OneDrive with version history.
  • Enable “Confirm before deleting” in your OS settings to reduce accidental deletes.
  • For important files, use a 3-2-1 backup rule: 3 copies, 2 different media, 1 offsite.
  • If you must delete sensitive data, use a secure erase tool that overwrites the data multiple times (though this also makes recovery impossible).

Frequently Asked Questions

Can I undo a delete after emptying the Recycle Bin?

Not through the operating system’s built-in undo. You’ll need third-party recovery software, and success depends on how quickly you act and the drive type. On HDDs, immediate recovery has a high chance; on SSDs, it’s often impossible due to TRIM.

Does “Shift + Delete” on Windows bypass the Recycle Bin?

Yes. Pressing Shift+Delete permanently deletes the file without sending it to the Recycle Bin. The data is still recoverable with software until overwritten, but it’s much harder because there’s no Trash entry to restore from.

Why can’t I find a file in the Trash that I deleted?

Possible reasons: the file was too large for the Trash (Windows has a max size), the file was on a network or removable drive (those bypass the Trash), or the Trash was auto-emptied by a cleanup tool or storage sense.

How long does a deleted file stay in the Trash?

Indefinitely, until you manually empty it or the Trash reaches its maximum size (default is 5% of drive space on Windows). Some systems have auto-purge settings, but by default files stay until you delete them.

Is it safe to use recovery software on my main drive?

No. Installing and running recovery software on the same drive can overwrite the very data you’re trying to recover. Use a portable version on a USB stick, or connect the drive as a secondary drive to another computer.

Can I recover files from a formatted drive?

Sometimes. A quick format only removes the file system structure, not the data. Recovery software can often reconstruct files from a quick-formatted drive. A full format or secure erase makes recovery nearly impossible.

Related

Method: the standard formula for this calculation, rounded as each result states. See how the calculators work or report an error.

More cards in this drawer

The whole Numbers and Powers drawer →