How To Install testdisk on Debian 10

Learn how to install testdisk on Debian 10 with this tutorial. testdisk is Partition scanner and disk recovery tool, and PhotoRec file recovery tool

Introduction

In this tutorial we learn how to install testdisk on Debian 10.

What is testdisk

testdisk is:

TestDisk checks the partition and boot sectors of your disks. It is very useful in forensics, recovering lost partitions. It works with :

  • DOS/Windows FAT12, FAT16 and FAT32
  • NTFS ( Windows NT/2K/XP )
  • Linux Ext2 and Ext3
  • BeFS ( BeOS )
  • BSD disklabel ( FreeBSD/OpenBSD/NetBSD )
  • CramFS (Compressed File System)
  • HFS and HFS+, Hierarchical File System
  • JFS, IBM’s Journaled File System
  • Linux Raid
  • Linux Swap (versions 1 and 2)
  • LVM and LVM2, Linux Logical Volume Manager
  • Netware NSS
  • ReiserFS 3.5 and 3.6
  • Sun Solaris i386 disklabel
  • UFS and UFS2 (Sun/BSD/…)
  • XFS, SGI’s Journaled File System

PhotoRec is file data recovery software designed to recover lost pictures from digital camera memory or even Hard Disks. It has been extended to search also for non audio/video headers. It searches for following files and is able to undelete them:

  • Sun/NeXT audio data (.au)
  • RIFF audio/video (.avi/.wav)
  • BMP bitmap (.bmp)
  • bzip2 compressed data (.bz2)
  • Source code written in C (.c)
  • Canon Raw picture (.crw)
  • Canon catalog (.ctg)
  • FAT subdirectory
  • Microsoft Office Document (.doc)
  • Nikon dsc (.dsc)
  • HTML page (.html)
  • JPEG picture (.jpg)
  • MOV video (.mov)
  • MP3 audio (MPEG ADTS, layer III, v1) (.mp3)
  • Moving Picture Experts Group video (.mpg)
  • Minolta Raw picture (.mrw)
  • Olympus Raw Format picture (.orf)
  • Portable Document Format (.pdf)
  • Perl script (.pl)
  • Portable Network Graphics (.png)
  • Raw Fujifilm picture (.raf)
  • Contax picture (.raw)
  • Rollei picture (.rdc)
  • Rich Text Format (.rtf)
  • Shell script (.sh)
  • Tar archive (.tar )
  • Tag Image File Format (.tiff)
  • Microsoft ASF (.wma)
  • Sigma/Foveon X3 raw picture (.x3f)
  • zip archive (.zip)

There are three methods to install testdisk on Debian 10. We can use apt-get, apt and aptitude. In the following sections we will describe each method. You can choose one of them.

Install testdisk Using apt-get

Update apt database with apt-get using the following command.

sudo apt-get update

After updating apt database, We can install testdisk using apt-get by running the following command:

sudo apt-get -y install testdisk

Install testdisk Using apt

Update apt database with apt using the following command.

sudo apt update

After updating apt database, We can install testdisk using apt by running the following command:

sudo apt -y install testdisk

Install testdisk Using aptitude

If you want to follow this method, you might need to install aptitude first since aptitude is usually not installed by default on Debian. Update apt database with aptitude using the following command.

sudo aptitude update

After updating apt database, We can install testdisk using aptitude by running the following command:

sudo aptitude -y install testdisk

How To Uninstall testdisk on Debian 10

To uninstall only the testdisk package we can use the following command:

sudo apt-get remove testdisk

Uninstall testdisk And Its Dependencies

To uninstall testdisk and its dependencies that are no longer needed by Debian 10, we can use the command below:

sudo apt-get -y autoremove testdisk

Remove testdisk Configurations and Data

To remove testdisk configuration and data from Debian 10 we can use the following command:

sudo apt-get -y purge testdisk

Remove testdisk configuration, data, and all of its dependencies

We can use the following command to remove testdisk configurations, data and all of its dependencies, we can use the following command:

sudo apt-get -y autoremove --purge testdisk

Dependencies

testdisk have the following dependencies:

References

Summary

In this tutorial we learn how to install testdisk package on Debian 10 using different package management tools: apt, apt-get and aptitude.