TechBuzzPro

Free Software to Recover Deleted Files – Guide & Tips

· 7 min read · Apps & Browsers

In this article
  1. Background – Why Files Disappear
  2. How Free Recovery Tools Work
  3. Choosing the Right Tool for Your Situation
  4. Step‑by‑Step Guide for the Most Popular Tools
  5. Common Problems and How to Fix Them
  6. Safety and Best Practices
  7. Alternatives and When to Consider Paid Software
  8. Frequently Asked Questions

Yes, there are several free open‑source programs that can recover deleted files, including TestDisk/PhotoRec, extundelete, and Scalpel. These tools work by scanning the storage medium for remnants of file data that the operating system has marked as free but not yet overwritten.

Background – Why Files Disappear

When you delete a file, the operating system typically does not erase the actual data. Instead, it removes the entry from the file‑system index and marks the space as available for new data. Until that space is overwritten, the original bits remain on the disk and can be reconstructed. The ease of recovery depends on three factors:

  • File‑system type – NTFS, FAT, ext3/4, HFS+, and APFS each handle deletion differently.
  • Time since deletion – The longer you wait, the higher the chance that new files will overwrite the old sectors.
  • Disk activity – Writing large files, installing software, or even running the OS can reduce recoverable data.

Understanding these basics helps you choose the right tool and avoid actions that could permanently destroy the data you want to retrieve.

How Free Recovery Tools Work

Open‑source recovery utilities share a core set of techniques:

  1. File‑system metadata analysis – Programs like TestDisk read the partition table and file‑system structures to locate lost clusters and rebuild directory entries.
  2. Signature‑based carving – Tools such as PhotoRec and Scalpel ignore the file system and search raw sectors for known file headers (e.g., JPEG "FF D8 FF"), then extract contiguous data until an end‑of‑file marker is found.
  3. Journal replay – extundelete reads the ext3/4 journal to replay recent operations, which can restore files that were deleted but not yet committed to the main inode table.

Because these utilities operate at a low level, they can run on any operating system that can read the target drive, though the user interface may differ (command line vs. graphical).

Choosing the Right Tool for Your Situation

Not every free recovery program is ideal for every scenario. Use the following decision matrix to narrow your choice:

  • Operating system
    • Windows: TestDisk (command line) and PhotoRec (graphical front‑end) work well.
    • Linux: extundelete (ext3/4), TestDisk, and Scalpel are native.
    • macOS: TestDisk and PhotoRec run under Terminal; third‑party GUI wrappers exist.
  • File‑system type
    • NTFS/FAT: TestDisk can rebuild partition tables; PhotoRec can carve most file types.
    • ext3/4: extundelete is specifically designed for these Linux file systems.
    • exFAT/HFS+: PhotoRec works, but specialized tools may give better results.
  • File type priority
    • Documents, PDFs, and archives: TestDisk’s metadata recovery often restores original names and folder structure.
    • Photos, videos, and audio: PhotoRec’s signature carving excels at bulk extraction.
    • Large binary files (ISO, VMDK): Scalpel can be tuned with custom signatures for better accuracy.

1. TestDisk (metadata recovery)

  1. Download the latest TestDisk package from the official website and extract it.
  2. Run testdisk as an administrator (Windows) or with sudo (Linux/macOS).
  3. Select “Create” to start a new log file.
  4. Choose the disk that contains the lost partition and press Enter.
  5. Pick the correct partition table type (usually detected automatically).Select “Analyse” to scan for deleted partitions.
  6. If the lost partition appears, choose “Quick Search” and then “Deeper Search” if needed.
  7. When the partition is listed, press P to list files. Deleted files appear in red.
  8. Highlight the files you want, press C to copy, and specify a destination on a different drive.

If TestDisk cannot locate the partition, you can still use its “Advanced” menu to recover individual files from the file‑system’s inode table.

2. PhotoRec (file‑carving)

  1. PhotoRec is bundled with TestDisk; launch photorec from the same folder.
  2. Choose the affected drive and select the partition (or “Whole disk” for raw scanning).
  3. Specify the file system type – “Other” for NTFS/FAT, “Ext2/Ext3” for Linux, etc.
  4. Set the destination folder on a separate physical drive; PhotoRec will refuse to write to the source.
  5. Press Search. PhotoRec will display a progress bar as it scans sector by sector.
  6. When finished, examine the output folder. Files are named generically (e.g., f123456.jpg) but retain their original content.

Because PhotoRec ignores file names, you may need to sort the recovered files by type and date to identify the needed ones.

3. extundelete (Linux ext3/4 journals)

  1. Install extundelete via your distribution’s package manager (e.g., sudo apt install extundelete).
  2. Unmount the affected partition to prevent further writes: sudo umount /dev/sdX1.
  3. Run the recovery command, replacing /dev/sdX1 with your device: sudo extundelete /dev/sdX1 --restore-all.
  4. The tool creates a folder called RECOVERED_FILES in the current directory containing the restored items.
  5. If you know the exact path, use --restore-directory /path/to/dir to limit the scan and speed up recovery.

extundelete works only if the journal still contains the deletion entry; otherwise, fall back to TestDisk or PhotoRec.

4. Scalpel (customizable carving)

  1. Install Scalpel (e.g., sudo apt install scalpel on Debian‑based systems).
  2. Edit /etc/scalpel/scalpel.conf to enable the file types you need by removing the leading # from the corresponding lines.
  3. Run the scan: sudo scalpel -c /etc/scalpel/scalpel.conf -o /tmp/recovered /dev/sdX.
  4. Scalpel writes recovered files into the output directory, preserving the original extension when possible.

Scalpel’s strength lies in its ability to add custom signatures for obscure formats, making it a good choice for forensic work.

Common Problems and How to Fix Them

Even with the best tools, you may encounter obstacles. Below are typical issues and proven remedies:

  • Tool refuses to run without administrator rights – Always launch recovery utilities with elevated privileges; on Windows, right‑click and choose “Run as administrator.”
  • Drive is mounted read‑only – Unmount the partition (Linux) or use “Disk Management” to take the volume offline before scanning.
  • Recovered files are corrupted – This usually means the sectors were partially overwritten. Try a different tool that uses a different carving algorithm, or limit the scan to the exact file size range.
  • Too many false positives – Refine PhotoRec’s or Scalpel’s file‑type list to include only the formats you actually need; this reduces noise.
  • Insufficient disk space for output – Always direct recovered files to a drive with at least twice the size of the source partition to avoid truncation.

Safety and Best Practices

Data recovery can be risky if you inadvertently write to the damaged drive. Follow these safety steps every time:

  1. Stop using the drive immediately after you notice missing files. Continued use increases overwrite risk.
  2. Create a sector‑by‑sector image before any recovery attempt. On Linux, use dd if=/dev/sdX of=/path/to/image.img bs=4M conv=noerror,sync. On Windows, tools like “Win32 Disk Imager” can create a raw copy.
  3. Work on the image, not the original – Point TestDisk, PhotoRec, or other utilities at the .img file to keep the source untouched.
  4. Verify recovered files by opening them in their native applications before deleting the image.
  5. Keep backups of important data to avoid future reliance on recovery software.

Alternatives and When to Consider Paid Software

Free tools cover most everyday recovery cases, but commercial solutions sometimes offer advantages:

  • Deep scanning algorithms – Paid products may implement proprietary heuristics that locate fragmented files better than generic carving.
  • User‑friendly interfaces – If you are uncomfortable with command‑line tools, a graphical suite like EaseUS Data Recovery Wizard provides guided wizards.
  • Professional support – Enterprise environments often need guaranteed results and technical assistance, which free software cannot provide.

Before purchasing, try the free utilities on a copy of the drive. If they recover the needed files, a paid solution is unnecessary.

Frequently Asked Questions

Can I recover files from an SSD?

Yes, but SSDs use TRIM, which actively erases blocks after deletion. If TRIM has already run, the data is unrecoverable. Recovery is most successful when the drive is powered off immediately after deletion.

Do I need to reinstall the operating system after using TestDisk?

No. TestDisk only reads and writes to the disk sectors you direct it to. It never modifies system files unless you explicitly restore a partition.

Is PhotoRec safe for encrypted drives?

PhotoRec cannot decrypt encrypted volumes. You must first unlock the drive with the appropriate password or key, then run PhotoRec on the decrypted logical volume.

What if the recovered files have no original names?

Signature‑based tools assign generic names because they do not read directory entries. You can sort by file type and modification date to infer original names, or use TestDisk beforehand to try to recover the directory structure.

Can I recover files from a formatted USB stick?

Formatting usually only recreates the file‑system structures. As long as the data blocks have not been overwritten, tools like TestDisk and PhotoRec can retrieve the files.

How long does a recovery scan take?

Scan time depends on drive size, speed, and the depth of search. A quick scan of a 500 GB HDD may finish in 30 minutes, while a deep carve of the same drive can take several hours.