0

when i try to uninstall python3 using "sudo apt-get purge python3" command in terminal, this warnning appears : You are about to do something potentially harmful. To continue type in the phrase 'Yes, do as I say!' ?] this is complete Error

and also i start it by 'yes,do as I say' but i saw this uninstalling takes a long time and i canceled it. Could it harm my os or pc? and if yes how can i check health of my os?

  • Could it harm my os or pc? PC, no ... OS, yes. Latest versions of Ubuntu rely a great deal on python3 being present to function correctly. You should fix this by reinstalling if you can. Also it seems from the screenshot that you are not running an official Ubuntu flavor, if this is the case then this question is off-topic here. – Raffa Oct 26 '19 at 17:31
  • mint is not official? – Amir reza Riahi Oct 26 '19 at 17:38
  • No, please see [Official Ubuntu flavours](https://ubuntu.com/download/flavours) You can alternatively ask here: https://unix.stackexchange.com/ – Raffa Oct 26 '19 at 17:44
  • I have only mint and ubuntu19.04 which is not LTS, which one is better for temporarily installing? – Amir reza Riahi Oct 26 '19 at 17:53
  • Depends on your preference. Both will do the job. It is just that we only provide support for Ubuntu and official flavors here. – Raffa Oct 26 '19 at 17:57
  • NEVER agree to a "do as I say warning" unless you understand the consequences (a broken system). Since you did do so (unwise!), and then cancelled apt in the middle of package actions (even more unwise!), it's possible that your system is broken far beyond easy repair. Time to use a LiveUSB to back up your data, then reinstall Ubuntu. – user535733 Oct 26 '19 at 18:13
  • Possible duplicate of [Removed Python 3 and now Ubuntu Software Center, terminal and other applications don't work](https://askubuntu.com/questions/384033/removed-python-3-and-now-ubuntu-software-center-terminal-and-other-applications) – Eliah Kagan Oct 27 '19 at 07:43

2 Answers2

2

Purging an application removes everything regarding it on your computer. Since lots of the OS is based on Python, removing it can harm the OS. You should never have a need to purge, instead, I always recommend remove instead. Unlike purge, remove will not remove the configuration files of the program, only the program itself.

For example: sudo apt-get purge <packagename> becomes sudo apt-get remove <packagename>.

The first answer of this question further explains the differences between purge and remove if you need more clarification :).

In order to fix your potentially broken system, I recommend reinstalling Python3. Run sudo apt-get install --install-recommends python3 to reinstall Python3 and dependencies that could have also been removed. If it says that it is already installed, then sudo apt-get install --reinstall python3.

Hopefully this helps you :).

Daniel M.
  • 1,808
  • 1
  • 12
  • 20
1

Yes it can harm your OS. A lot of OS tools are in fact scripts in Python. Python 2 is going to be retired soon, therefore python 3 is taking it's place now.

Maciejos
  • 31
  • 2