This question already has an answer here:

I deleted 40 some photos from my SD card in my camera. I thought I saved them on my desktop. Using 12.04 LTS. Is there a way to restore the photos?? My wife is pissed. Nothing has been over written on the card.


marked as duplicate by Eric Carvalho, Luis Alvarado Aug 9 '13 at 14:23

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.



Use the tool photorec; you'll be able to recover pretty much any file.

You should make sure that the SD card is read only as writing to it can corrupt any possibility of recovering data.


In Ubuntu, open a terminal and run:

$ sudo apt install testdisk
$ sudo photorec
  • Just tried it, it works great, recovered all files on sdcard. – conualfy Sep 3 '14 at 22:59
  • 2
    sudo apt-get install testdisk will install the photorec binary. – Steve Jun 29 '16 at 19:13
  • Worked like a magic for me. – Benjamin Harel Dec 4 '17 at 14:09
  • Wow, lifesaver! Restored almost all the lost photos! – 0x49D1 May 24 '18 at 20:36

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