Stop using that Ubuntu installation
First of all immediately stop using that Ubuntu installation. Now!
You should boot straight to a live DVD/USB. If you don't have one, do not download it from that system and go get it somewhere else. However, if you have a dual boot, you might also use Windows to download the ISO.
Try to access the deleted files
When you are using the live DVD, check the partitions with:
sudo parted -l
You need to find the right one that contains your home directory. For example, my computer shows the following for drive
Number Start End Size Type File system Flags
1 1049kB 256MB 255MB primary ext2 boot
2 257MB 250GB 250GB extended
5 257MB 250GB 250GB logical
This is not the best example because I am using full disk encryption, but assuming I wanted to restore files from
/boot I would target
/dev/sda1 (basically look at the number).
At this point, connect an external hard drive where you want to recover the files.
Now you need to install a program called Testdisk:
sudo apt install testdisk
Then run it on your drive:
sudo testdisk /dev/sda
It will display an interactive procedure that you need to follow through the textual interface. Basically you will arrive at a list of partitions and you need to select the right one with the arrow keys.
Then you will need to press P to show the files and navigate in the directory tree. Once you have determined that hopefully your home directory contains the stuff (shown in red since it has been deleted), go one level up so that you highlight your username inside
/home and press C to activate the Copy function.
Testdisk will ask you where you want to save the files. Navigate to a directory in your external hard drive and confirm. Wait patiently while it restores your data in the external drive.
Ubuntu has a backup program installed by default. You should use it routinely, before something like this happens again.