1. Home
  2. How to Install TestDisk in Ubuntu

How to Install TestDisk in Ubuntu

TestDisk is a partition scanner and disk recovery tool that can recover lost partitions and recover disk and data. If you are using Ubuntu Linux, its a good idea to keep recovery tool installed in the system. In case you accidentally delete or alter a partition, it can be recovered by using TestDisk. If you have lost files, it can recover lost files. To get and install TestDisk in Ubuntu, follow this guide.

TestDisk is already in the Ubuntu repository. Its a part of Ubuntu apps.

Press Ctrl+Alt+T to bring up terminal window in Ubuntu. You can install Testdisk by using following command in the terminal.

sudo apt-get install testdisk

Hit Enter

To run Testdisk as root, use following command (depending on package name):

sudotestdisk

Hit Enter. This should opened Testdisk in Ubuntu.

OR here is the command depending on package name.

sudo testdisk-6.14/testdisk_static

If you encounter the following error: ‘Unable to locate package testdisk‘, you have to enable the universe repository first or you misspelled something in command. Here is guide to troubleshoot ‘unable to locate package’ error.

Refer :http://www.tipsninja.com/install-testdisk-ubuntu/

Unable to Locate Package – Ubuntu

By using terminal commands, you can install software in Ubuntu from ‘official Ubuntu repository’ that is a part of Ubuntu apps. While installing you might encounter the following error: ‘Unable to locate package‘. This means software was not installed. You have to do the following to get rid of this error.

If you just installed Ubuntu, then you need to run upgrade and update commands in terminal.

sudo apt-get upgrade

sudo apt-get update

Check spelling of the command statement. Syntax is the following:

sudo apt-get install <appname>

Command to install testdisk by using terminal:

sudo apt-get install testdisk

It command is correct, enable universe repository from Ubuntu software settings. Here is the error when I tried to install testdisk.

Enable Universe Repository for Software

Open ‘Software and Updates’ by typing ‘software’ in search.

Select Software and Updates.

Check the box that says, Community-maintained free and open-source software (universe).

Next time when you install apps from official Ubuntu repository, by using correct command and name of package, it will be installed in your computer.

Refer: http://www.tipsninja.com/unable-to-locate-package-ubuntu/

Updated on March 14, 2018

Was this article helpful?