By mistake I ran

sudo apt-get purge 7.0.*  

instead of

sudo apt-get purge PHP 7.0.*

Now my system is not opening. What to do now?

I updated the system but still no progress.

  • 4
    The second command is not better than the first!!! – mook765 Apr 29 '17 at 5:33

I made the same mistake a few months ago. The best option you have is to use a bootable USB drive and take a backup of your data. Then you can try to restore Ubuntu.

  1. Boot using live bootable usb
  2. Make a backup of your data (in case something goes wrong)
  3. Try to re-install Ubuntu
  4. If re-installation doesn't work
  5. Delete all directories from Ubuntu root except /etc/ and /home/ then install Ubuntu
  6. While entering username and password, enter the same username and password same as the old ones
  7. Reboot and see if it works
  8. If steps 5-6 don't work, then re-install completely and restore from backup
| improve this answer | |
  • Why you suggested not to delete etc / and /home directory ? – inrsaurabh Apr 28 '17 at 2:32
  • 1
    because home directory contains all your desktop and local configurations files and /etc/ contains all global configuration files. – Alok Yadav Apr 29 '17 at 4:49

(if you mean it won't boot by not opening) There's probably a more efficient solution than this (that I don't know, of course), but I would boot it from a live USB, back up all of your files onto another USB if you haven't already backed your files up, and reinstall Ubuntu.

| improve this answer | |
  • Thanks for suggestion. Is there is no way to install all missed application that was purged , because even after upgrading the system i think it only upgraded the available application not the one i uninstalled. Reinstall is the last option we all have . – inrsaurabh Apr 23 '17 at 4:39
  • I don't know any way, but that does not mean there is no way. – that guy Apr 23 '17 at 4:41

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