Python Forum
I can't remove python. I'm not kidding, it doesn't get uninstalled.
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
I can't remove python. I'm not kidding, it doesn't get uninstalled.
I've spent like a week's worth of man-hours trying to get uwgsi to work (see ), and my problem must be obscure because no one's advice works (or I get no responses to posts on forums), I got desperate so tried removing python and reinstalling it. It won't uninstall.

Ubuntu 18.04.2

sudo apt-get remove python.

It does a lot of stuff, clears up 250something MB.

I type python. I get a python prompt.
I type python2. I get a prompt.
I type python3. I get a prompt.

So I sudo apt-get remove python3.

Once again, it removes a bunch of packages, etc, clears up (now it's 500something MB)

I type python3.
I get a prompt.

It won't die.

It's not like I have it in some obscure place.

[email protected]:~/tdailydiscount$ which python
[email protected]:~/tdailydiscount$ which python3
[email protected]:~/tdailydiscount$ which python2
How do I kill python so I can reinstall it?
I'm afraid you broke your Ubuntu system. One must not remove python in a Ubuntu system. The gigabytes that were removed are other programs that depend on python. As a general rule, it is not a good idea to carry on with sudo apt-get remove when the system warns of a large bunch of removals. It means that you're doing something wrong. In your position, I would reinstall Ubuntu.
OK when I reboot I get the CLI. It doesn't have network capability, but if I can get network capability to work then presumably I can just reinstall python (which ironically was still working so... uhhh... was still installed.)

So if I can reinstall python and all of its packages then presumably it might be ok?

oh you mean entire programs? Not just packages they depend on?
david503 Wrote:oh you mean entire programs? Not just packages they depend on?
I mean that apt removed programs that depend on python to run. They won't be reinstalled if you attempt something like "reinstalling python", which by the way is probably unnecessary because in the end you still have python.

It is not difficult to reinstall ubuntu
  1. Save your personal files on an external hard drive before you do anything else.
  2. Burn a bootable DVD with the .iso image of Ubuntu 18.04 downloaded from the ubuntu website. They say that you can also create a bootable USB key instead of a DVD but usually I don't have much success with this.
  3. Reboot the computer on the DVD (make sure the computer is connected to the internet) and follow the installation instructions.
  4. Remove the DVD, reboot the computer and do sudo apt update and then sudo apt upgrade in a terminal.
  5. Reboot and enjoy a fresh install of Ubuntu.
Yea yea I know how to reinstall ubuntu, thanks. (I'm a developer for 20+ years, so...). It's going to take about three days to reinstall everything again. I wish this had all happened two months from now because Ubuntu 20 LTS comes out in april. Ug. I can't hobble along on a livecd all the way till then so I gotta bite the bullet. Here I go.

I realised that apt has a history log. By looking in the history log, one should be able to reinstall packages that were uninstalled.

Possibly Related Threads…
Thread Author Replies Views Last Post
  why doesn't python look in two directions Kakha 21 1,840 Jan-01-2021, 11:24 PM
Last Post: jefsummers
  Python IDE doesn't see opencv-python package on my Jetson Nano sadhaonnisa 1 915 Oct-11-2020, 01:04 AM
Last Post: Larz60+
  Python: command “python -m pip install --upgrade pip” doesn't work apollo 2 2,710 Sep-16-2019, 03:11 PM
Last Post: snippsat

Forum Jump:

User Panel Messages

Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020