Fortunately, a number of tools are available to help recover lost information, and among them, TestDisk stands out as one of the most powerful and free open-source solutions for data recovery.
What is TestDisk?
TestDisk is a command-line utility developed by Christophe Grenier, aimed at recovering lost partitions and making non-booting disks bootable again. It supports numerous file systems including NTFS, FAT, exFAT, ext2/3/4. and more, making it a versatile solution for users on Windows, macOS, and Linux.

Key Features of TestDisk:
Recover lost partitions
Repair partition tables
Rebuild boot sectors
Fix FAT tables
Copy files from damaged partitions to another storage location
Works with a variety of file systems and platforms
Common Scenarios Where TestDisk is Useful
TestDisk is especially effective in the following cases:
Deleted Partition Recovery: If you’ve accidentally deleted a partition, TestDisk can scan the disk and restore it.
Corrupted Partition Table: In cases where a partition table becomes unreadable or corrupted, TestDisk can reconstruct it.
Accidentally Formatted Drives: When data is lost due to quick formatting, TestDisk may recover lost files and partitions.
Lost File Recovery: Although TestDisk’s primary focus is partition recovery, it also allows file extraction from damaged volumes.
Installing TestDisk
TestDisk is available for most operating systems. To get started, download the latest version from the official CGSecurity website:
Windows: Download the ZIP file, extract it, and run testdisk_win.exe.
macOS: Use Homebrew (brew install testdisk) or download a precompiled binary.
Linux: Install using package managers like apt (sudo apt install testdisk) or yum.
No installation is required for the Windows version—it’s portable and can be run directly from the folder.
How to Recover Data with TestDisk – Step-by-Step Guide
Step 1: Launch TestDisk
Open a terminal or command prompt and navigate to the TestDisk folder. Start the application by running:
sudo testdisk
(or testdisk_win.exe on Windows)
Step 2: Create or Use a Log File
TestDisk prompts you to create a log file. Choose from:
Create – start a new log file
Append – continue an existing log file
No Log – skip logging (not recommended)
Step 3: Select the Disk
Use the arrow keys to choose the disk where you lost data. TestDisk lists all detected storage devices.
Step 4: Choose the Partition Table Type
TestDisk usually auto-detects the correct partition table:
Intel/PC partition (most Windows systems)
EFI GPT (modern systems using UEFI)
Mac, Sun, etc.
Step 5: Select Analysis
Choose Analyze to check the disk structure and search for lost partitions.
Step 6: Quick Search
TestDisk performs a quick scan for deleted or lost partitions. Use arrow keys to highlight a found partition and press P to list files.
Step 7: Deeper Search (if needed)
If the quick search doesn’t locate the desired partition, choose Deeper Search for a more thorough scan.
Step 8: Recover Files
Once TestDisk identifies the correct partition and lists files:
Use arrow keys to highlight files/folders
Press C to copy
Select a destination directory to save recovered files
Step 9: Write Partition Table (Optional)
If you want to restore the partition itself:
Select Write to save the partition structure to disk
Reboot the system afterward to recognize restored partitions
TestDisk Tips for Better Recovery Results
Stop Using the Affected Drive: Minimize data overwriting by stopping further usage until recovery is attempted.
Run as Administrator or with Sudo: Full access is essential for TestDisk to read and write partition data.
Use a Separate Recovery Destination: Always copy recovered files to a different drive to avoid further damage.
Try Photorec for Individual Files: If partition recovery isn’t working, use TestDisk’s companion tool, PhotoRec, for file-based recovery.
Understanding TestDisk Interface
TestDisk may feel intimidating due to its text-based interface, but it is quite logical:
Arrow Keys – Navigate
Enter – Select
Q – Quit or go back
P – List files
C – Copy selected files
A – Select all files
This interface keeps the software light, responsive, and suitable for low-level disk interactions.
Limitations of TestDisk
While TestDisk is highly effective, it does have limitations:
Not GUI-based – May be challenging for beginners
Cannot recover overwritten data
No live preview of files
Limited file recovery compared to PhotoRec
Does not support encrypted partitions unless decrypted first
Despite these, TestDisk remains a top choice for those needing deep-level recovery capabilities.
When to Use Professional Help
If TestDisk fails to locate your data or your drive has physical damage, professional data recovery services are recommended. They use advanced tools and cleanroom environments to recover data from:
Broken SSDs/HDDs
Drives with bad sectors
Firmware-level corruption
Real-World TestDisk Recovery Example
Scenario: A photographer accidentally deletes the main partition on an external hard drive.
Recovery Process:
The user runs TestDisk from a USB stick
Chooses to analyze the disk
Finds the deleted NTFS partition using Deep Search
Lists all files and copies them to a new external SSD
Avoids writing to the old disk until recovery is complete
Outcome: All critical image files are recovered without data loss.
Final Thoughts: Is TestDisk Right for You?
If you’ve lost data due to partition issues, quick formatting, or file system errors, TestDisk is one of the most effective tools available—especially considering it’s completely free. While the lack of a graphical interface may deter some users, its power, versatility, and success rate make it invaluable for both personal and professional use.
About us and this blog
Panda Assistant is built on the latest data recovery algorithms, ensuring that no file is too damaged, too lost, or too corrupted to be recovered.
Request a free quote
We believe that data recovery shouldn’t be a daunting task. That’s why we’ve designed Panda Assistant to be as easy to use as it is powerful. With a few clicks, you can initiate a scan, preview recoverable files, and restore your data all within a matter of minutes.
Subscribe to our newsletter!
More from our blog
See all postsRecent Posts
- Recover data from usb stick 2025-05-20
- Recover data from compact flash card 2025-05-20
- Recover data with testdisk 2025-05-20