Losing important data can be devastating. As a Linux system administrator, I have helped many clients recover from failed drives, accidental deletions, and corrupted file systems. Thankfully, the Linux community has developed excellent open source data recovery tools over the years.
In this comprehensive guide, I will share my top recommendations for Linux data recovery software based on over 10 years of experience. We will cover everything from simple undelete utilities to advanced disk cloning tools. Follow along to learn how to install and use these essential tools.
Key Factors in Choosing Data Recovery Software
Here are some key considerations when selecting a data recovery tool for Linux:
- File system support – The utility should handle EXT, XFS, Btrfs, and other common Linux file systems.
- Logical vs physical recovery – Logical tools recover deleted files and directories. Physical tools clone failing drives byte-by-byte.
- Ease of use – Command line tools give you more control, but graphical tools are easier for less technical users.
- Non-destructive writes – Ensure the tool will not overwrite the original data during the recovery process.
- File browsing – Being able to browse found files and preview images allows targeted recovery.
- Sector editor – Hex editors let advanced users find lost partitions and custom file signatures.
Keeping these aspects in mind, let‘s look at five excellent free and open source data recovery tools for Linux.
1. PhotoRec – File Recovery Using Data Carving

PhotoRec is a free, open source utility included in the TestDisk package that focuses on data carving for recovering lost files. It works on Linux, Windows, Mac OS X, FreeBSD, NetBSD, OpenBSD, and older Solaris systems.
Data carving reads the raw bytes on a drive and attempts to reconstruct files based on file signature patterns and metadata. This makes PhotoRec good for recovering files when directories or file system information has been corrupted or deleted.
To use PhotoRec, first install TestDisk using your package manager. Then launch PhotoRec and select the drive to scan. You can customize the file formats to search for and destination to save recovered files. PhotoRec will then scan the entire drive and reconstruct files it finds byte-by-byte.
Key Features:
- Recovers hundreds of file formats including media, documents, archives, and more
- Scans raw disk bytes to locate files without relying on metadata
- Supports major file systems and devices like hard drives, flash drives, and memory cards
- Command line interface gives advanced control over recovery process
PhotoRec is relatively easy to use but provides advanced sector-level control over data carving for power users. Due to its data carving approach, it can recover older versions of files that have been overwritten. This makes PhotoRec one of my essential tools for both logical file recovery and handling physical media failures.
2. Disk Drill – Intuitive Graphical Data Recovery

Disk Drill provides an intuitive graphical interface for recovering lost data on Linux. It is a commercial closed-source tool developed by CleverFiles but has a free basic recovery option.
After installing Disk Drill, you select the drive to scan and choose quick or deep scanning. Quick scan recovers recently deleted files, while deep scan searches byte-by-byte for older archived files. Users can pause and resume scans as needed.
Once the scan completes, you get a visual file browser to preview found items and selectively recover needed data. This protects against inadvertently overwriting existing files during recovery. You also get filtering options to help locate specific lost documents and multimedia.
Advanced users can upgrade to Disk Drill Pro to unlock features like corrupted partition reconstruction, unlimited file recovery, protection against overwriting files, byte-level imaging for failing drives, and bootable recovery USB drives.
Key Features:
- Intuitive graphical interface for visual recovery process
- Quick and deep scanning to find recently deleted or older archived files
- File browser with preview to check files before recovery
- Filtering to help isolate lost documents and media files
- Free basic recovery option recovers up to 500MB of data
If you need a user-friendly data recovery tool, Disk Drill is an excellent choice. The graphical tools and wizard-style workflows make data recovery straightforward for both IT pros and non-technical end users alike.
3. ddrescue – Cloning Failing Drives

ddrescue is the preferred open source tool for cloning failing drives byte-by-byte prior to data recovery. It is extremely stable at handling drives with bad sectors by repeatedly retrying reads to copy the maximum amount of retrievable data.
The clone produced by ddrescue allows recovery tools to work safely on the duplicated image rather than directly on the failing source drive. This protects against the failing drive deteriorating further during recovery attempts.
ddrescue first copies the easy readable data from beginning to end of the drive normally. Then it goes back and retries difficult areas in smaller increments to maximize rescued data. Users can periodically pause, resume, and check logs to monitor cloning status.
Key Features:
- Safely clone failing hard drives and storage media
- Minimizes bad sector read errors via retrying and sector remapping
- Creates disk image suitable for data recovery tools to run against
- Resume feature allows pausing and restarting cloning
- Maps bad sectors so drive errors don‘t propagate to recovered data
For failing, unstable, or dying drives, ddrescue should be your first step to create a clone for recovery. Its read retrying abilities exceed other Linux disk cloning tools like dd or cat. Just be sure to clone to a healthy drive with ample space prior to tinkering further.
4. extundelete – File Recovery for EXT File Systems

extundelete is an open source utility focused specifically on recovering deleted files from EXT-based Linux file systems like EXT2, EXT3, and EXT4. It works by scanning disk blocks for file metadata that was not fully overwritten after deletion.
After installing extundelete from your distribution‘s repositories, you mount the partition and scan it for recoverable inodes using the –inode argument. This locates available file directory entries ready for undeletion.
Next, a second scan using –restore-all brings back the full file contents associated with those inodes to a recovery directory. Users can browse this directory and restore only the specific files they want to preserve.
Key Features:
- Recover deleted files from EXT-based Linux file systems
- Two-pass method separates inode lookup from file content recovery
- Restore only needed files to avoid overwriting existing data
- Open source tool with long history in Linux community
For deleted file recovery on EXT partitions, extundelete simplifies the process while giving users precise control over restoration. It is not designed for catastrophic file system damage or device failures, however. Use filesystem cloning tools like ddrescue first for those cases prior to file recovery.
5. DebugFS – Manual File System Repair and Recovery

DebugFS is an extremely advanced, low-level Linux file system repair, debugging, and recovery tool. It gives users direct access to file system internals via an interactive command shell rather than an automated scanning tool.
Power users can utilize DebugFS to manually reconstruct things like directories, file inodes, file system tables, and journal logs in an interactive debugging environment. You must understand the on-disk layout and metadata of structures like inodes to use DebugFS effectively.
Accessing DebugFS requires mounting the partition separately in debug mode prior to entering file system commands manually. Take extreme caution with DebugFS as directly editing file systems without experience could make irrevocable changes or data loss!
Key Features:
- Powerful interactive shell gives access to on-disk file system internals
- Repair destroyed file system structures like directories and inodes
- View and reconstruct partition tables and journal logs
- Directly access and edit block mapping tables
- Extremely advanced tool intended for experts in Linux file systems
I include DebugFS because knowledge of Linux file system structures gives you almost unlimited recovery possibilities via direct editing. But only use DebugFS if you have years of file system development and operating system kernel expertise! Otherwise, utilize it only with guidance from advanced technicians.
Closing Thoughts on Linux Data Recovery
I hope this guide has given you a good overview of the best free and open source data recovery tools available for Linux systems. Each tool has particular strengths depending on your situation – from quick undelete to stabilizing failing drives to manually reconstructing file systems byte-by-byte.
The key is using the right tool for the job at hand rather than hoping a single tool solves all problems. Develop familiarity with these utilities before you face emergency data loss or hardware failures. Practicing recovery on test drives is useful preparation.
And as always, having reliable backups via built-in tools like Deja Dup or powerful solutions like Bacula minimizes reliance on recovery tools by restoring deleted files from backups instead. Combined with these data recovery methods however, you can recover from almost any data loss scenario.
Let me know if you have any other favorite Linux data recovery utilities I should check out! It‘s always helpful to expand my toolkit. Please share or leave a comment if you found this overview useful. And happy data recovering!


