0

I have just installed Ubuntu 14.04 LTS, but by mistake I deleted all partition. Now I want to recover the lost memory by installing testdisk . But when I try to execute the command sudo apt-get install testdisk in Terminal I get this error message:

Unable to locate package testdisk

Why does this occur and what can I do next?

marked as duplicate by Takkat, psusi, muru, Elder Geek, Eric Carvalho Jan 21 '15 at 17:24

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • 1
    Do not use your disk any more, and follow my answer there: askubuntu.com/questions/286181/… – Takkat Jan 21 '15 at 13:39
  • 1
    Are you positive your partitions were all deleted? Maybe the bootloader was just changed... If you're still running Ubuntu, or running a live dvd/usb, the command sudo parted -l (and maybe fdisk -l if you're using MBR) should list all your local disk partitions & current device names – Xen2050 Jan 21 '15 at 14:12
0

Probably jsut need to do a

sudo apt-get update

first, and if testdisk's still not available you may need to use the universe, restricted, multiverse "sections" of the repos, see the possible dup. question "Unable to locate package" while trying to install packages with APT or Ubuntu's Repositories help.

But are you positive your partitions were all deleted? Maybe the bootloader was just changed... If you're still running Ubuntu, or running a live dvd/usb, the command
sudo parted -l
(and maybe sudo fdisk -l if you're using MBR only) should list all your local disk partitions & current device names, maybe they're still there.

If they were all deleted, then further writing to the disk could overwrite more data, and doing as Takkat suggests would be the best idea. I don't think you can repair a hard disk with testdisk while it's mounted anyway, and having a backup copy to "play/fix" with would be the safest option.

Not the answer you're looking for? Browse other questions tagged or ask your own question.