This question already has an answer here:

I've been using Ubuntu 12.04 and accidentally deleted a folder using Shift+Del.

Does anyone have any idea how to recover the folder?

marked as duplicate by Eric Carvalho, Charles Green, muru, Elder Geek, bcbc Nov 30 '14 at 5:55

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.


Yes, you can use extundelete command. (extundelete is a utility to recover deleted files from ext3/ext4 partition.)

Note that the partition must be unmounted before you recover. In most cases, you will have to shut down your computer and boot using an Ubuntu LiveCD/LiveUSB to be able to this.

Steps to recover:

  • Install extundelete with:

    sudo apt-get install extundelete
  • Usage example:

    sudo extundelete --restore-directory /home/myself/Documents/deleted_folder/ /dev/sda1
  • The /dev/sda1 is the device name where the deleted data was.

  • 7
    Also note that if installing extundelete touches the partition on which you want to recover data, the fact that changes were made to that partition could potentially make recovery more difficult. – a CVn Jun 14 '12 at 12:02
  • @Frantique - I have run Ubuntu via LiveCD, but I can not install extundelete: E: Unable to locate package extundelete, how to solve this? – Ladislav Naďo Dec 11 '13 at 8:07
  • You have to enable universe repo to install it. – Frantique Jan 21 '14 at 15:15

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