0

After I removed the Python 3 package from my Ubuntu 18.04, I also lost the terminal, software centre and some other useful applications.

What do I need to do now?

  • 8
    Reinstall. Python3 is now the default "python" in use in most of the core packages in 18.04, and removing Python 3 will effectively torch your ability to do many things in the system. Your quickest solution is to reinstall. Your less-quick solution is to dig into the logs, find what was uninstalled, and issue apt-get install commands for all the removed packages to get them reinstalled. However, that doesn't guarantee things'll be fixed, since the interdependency on Python 3 is so major. Also don't remove Python 3 again. – Thomas Ward May 14 '18 at 19:46
  • After restart I m getting only black screen – Lokesh Pandey May 14 '18 at 19:55
  • May I ask why you did it? – Leo May 19 '18 at 21:42
4

As with answers from I want to uninstall Python3 and just use 2.7 and Removed python from my install, how do I get it back?, the core problem is that you removed something which is vital to the system. Note however that contrary to these other questions and their answers, the problem is that since you removed Python 3, you are now left with an extremely broken system, and no guarantee that you can repair it.

Without knowing which flavor of Ubuntu you attempted to use, the answer in Removed python from my install, how do I get it back? is not going to be useful. We would need to know which flavor you installed to properly provide you with the proper package(s) to attempt to reinstall. However, since Python is part of the core system now, the likelihood this type of 'reinstall' would work is not high, judging by the number of system dependencies which require Python 3.


Prior to more recent releases of Ubuntu, Python 2 was the default. A few years ago, however, the lifecycle of Python 2 was set with an end of life date of 2020.

Python 2 is no longer the 'default' Python in the latest Ubuntu. As such, many of the maintenance, system utility, and management programs and scripts now rely on Python 3.

Removing Python 3 is no longer a viable option for any Ubuntu systems. It will introduce its own form of self-induced torture to your life and computer if you do this. You are free to install other Python versions alongside it, but you cannot strip out Python 3 from your system without breaking it.

You could attempt to reinstall the Python 3 packages, going through the log files stored in /var/log/apt/history.log and finding what you removed and what else was removed with it, and then attempting to apt-get install those packages again, however this will be hit-or-miss and your success with this will vary.

The only tried-and-true way to recover from this type of critical mistake is to completely reinstall the system, backing up any specific data that you want to keep first.

|improve this answer|||||

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