I'm running Ubuntu 16.04 64 bit. I accidentally deleted some important files while trying to uninstall PostgreSQL and now I can't log in anymore, plus all the icons, even in the login screen, are not loading properly.

It's absolutely vital for me to restore it without losing any file and most importantly any settings and also without damaging my others Windows partitions. Is it possible (without doing a brand new installation in another partition just to retrieve the data, as suggest by several other people)?


UPDATE/FIX: In case someone else is experiencing the same problem, that's how I solved it. Even if you are not able to log in, once in the login screen, open the terminal (ctrl+alt+F1) and write

sudo apt-get -f install
sudo apt-get install ubuntu-desktop

reboot. And that's all.

  • Plug the HDD into another Linux box? – Android Dev Jul 24 '16 at 14:49
  • That would be the most elegant solution. – Android Dev Jul 24 '16 at 14:52
  • What happens when you boot your machine are you able to see the login screen? depending on what files you deleted you maybe able to reset your desktop. If you can get to your terminal try following this guide: ubuntuhandbook.org/index.php/2014/04/… – Rob Goss Jul 24 '16 at 14:57

Boot from a live DVD, mount your partitions and copy the files you need to backup to a USB disk or to google drive or something similar.

Your personal settings will be inside your /home/. Server settings though can be scattered all over the place. Hosting a website on that system? Have a database running?

The least risk next would be to re-install without formatting home or with "keeping your personal documents" by =replacing= your current Ubuntu.

It's absolutely vital for me to restore it without losing any file and most importantly any settings

Time to become very serious.

If that is vital to you I would claim you should have several tested backups and a restore plan for every personal file and setting I made in my system. Otherwise I claim you do not act like it is vital to you.

  • 1
    Thanks, especially for the life lesson, that's exactly what I needed. However, I solved it in another way. Cheers – Izzy88 Jul 24 '16 at 17:25

protected by Community Oct 21 '17 at 13:14

Thank you for your interest in this question. Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).

Would you like to answer one of these unanswered questions instead?

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