Overview and purpose
TestDisk is a free, open-source utility from CGSecurity designed to restore access to damaged or missing drive partitions. Its primary aim is to help users retrieve partitions and repair drives so previously inaccessible data can be reached again. It’s especially useful when partitions have been removed accidentally or corrupted by malware or disk errors.
Supported hardware and formats
- NTFS (Windows)
- FAT family (FAT12/FAT16/FAT32)
- ext (Linux filesystems)
- APFS (macOS)
The tool works with both internal and external drives, SSDs and HDDs, USB flash drives, and many other storage devices.
When this tool is useful
TestDisk is a good option if you encounter any of the following:
- A partition table has been damaged and the OS can’t mount the partition
- A partition was erased by mistake and needs recovery
- A virus or other corruption prevents access to stored files
- A boot drive won’t start and needs repair to become bootable again
Using the program (command-line workflow)
Note: TestDisk runs entirely in a text-based terminal — there’s no graphical interface.
- Start TestDisk and choose the Create entry to generate a new recovery session.
- Select the physical disk you want inspected from the list of detected devices.
- Pick the partition table type appropriate for the system (Windows, macOS, or Linux).
- Launch a scan and wait for it to complete; scanning may take time depending on drive size.
- Examine the scan results for lost or corrupt partitions and mark the one you want to recover.
The navigation is menu-driven inside the terminal, so basic keyboard navigation and reading prompts are usually sufficient to proceed.
Retrieving individual files
- From the main menus, open the Advanced options for the target drive.
- Choose the Undelete (or equivalent) command to display recoverable files.
- Browse the listed files, mark the items you need, and copy them to another safe location.
This mode is useful when you only need specific files rather than full partition recovery.
Final notes and recommendations
If you’re comfortable using a terminal, TestDisk is a powerful and reliable option to restore partitions or repair boot sectors. Always copy recovered data to a different drive to avoid overwriting remaining recoverable information, and consider creating a full disk image before attempting repairs on a failing device.
Technical
- Windows
- Mac
- Free