How To Install testdisk on CentOS 7

In this tutorial we learn how to install testdisk on CentOS 7. testdisk is Tool to check and undelete partition, PhotoRec recovers lost files

Introduction

In this tutorial we learn how to install testdisk on CentOS 7.

What is testdisk

Tool to check and undelete partition. Works with FAT12, FAT16, FAT32, NTFS, ext2, ext3, ext4, btrfs, BeFS, CramFS, HFS, JFS, Linux Raid, Linux Swap, LVM, LVM2, NSS, ReiserFS, UFS, XFS. PhotoRec is a signature based file recovery utility. It handles more than 440 file formats including JPG, MSOffice, OpenOffice documents.

We can use yum or dnf to install testdisk on CentOS 7. In this tutorial we discuss both methods but you only need to choose one of method to install testdisk.

Install testdisk on CentOS 7 Using yum

Update yum database with yum using the following command.

sudo yum makecache

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

sudo yum -y install testdisk

Install testdisk on CentOS 7 Using dnf

If you don’t have dnf installed you can install DNF on CentOS 7 first. Update yum database with dnf using the following command.

sudo dnf makecache

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

sudo dnf -y install testdisk

How To Uninstall testdisk on CentOS 7

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

sudo dnf remove testdisk

References

Summary

In this tutorial we learn how to install testdisk on CentOS 7 using yum and dnf.