42

I have uninstalled python3 via:

apt-get remove python

I lost the dashboard and terminal. Even the desktop is blank. Also the top bar which shows time and other setting options are gone. Basically I can see my desktop wallpaper when I open my laptop.

Whenever I open my laptop it shows following before showing the login. However, I can access the Ubuntu advanced options. I need to restore my data because it has my college projects.

Enter image description here

  • 10
    This is why it is always good to read the output of a command before confirming the removal of essential packages. Also, in the future, maybe --dry-run can be helpful to avoid this sort of situation. – Léo Lam Aug 11 '16 at 11:51
  • 7
    why? Why did you think it was a good thing to remove the python package? Basically half of Ubuntu is built in python... – Bakuriu Aug 11 '16 at 15:46
  • 2
    apt-get remove python will remove python 2. – James K Aug 11 '16 at 17:46
  • @Bakuriu why would someone know that? – Moberg Nov 03 '22 at 19:23

3 Answers3

81

You can press Ctrl+Alt+F5 to get a shell. Once there, try reinstalling Python and anything else you may be missing:

sudo apt-get install python3-all
sudo apt-get install gnome-terminal

If nothing seems to work properly, or your dependencies have been messed up, try installing all of the desktop components again. This should give you all of the dependencies you need.

sudo apt-get remove ubuntu-desktop
sudo apt-get install ubuntu-desktop
Error404
  • 7,440
10

Python3 is used by many system components on Ubuntu.. removing that will break a lot (as you just witnessed). Can you try to simply reïnstal Python3 again with sudo apt-get install python3?

Anwar
  • 76,649
Gladen
  • 2,726
7

Your current install is likely damaged beyond repair and needs to be wiped.

Boot up a live CD and mount your current install drive. Copy any important documents to a flash drive and reinstall Ubuntu.

Note that while you may be able to just reinstall Python, there may still be other (deeper) damage that isn't just apparent yet. You can run the following command to try to repair your OS:

sudo apt-get install --reinstall ubuntu-desktop
Kaz Wolfe
  • 34,122
  • 21
  • 114
  • 172