Recently, I mistakenly deleted a bunch of photos from the memory card before copying them to my computer. But luckily, I just had to install TestDisk package and use its PhotoRec utility, a tool to recover deleted files using an Ubuntu/Linux Computer.
apt-get install testdisk
Recover deleted images from the mounted memory
Detailed instructions on this can be found here. Interestingly, it also retrieved images that were long deleted.