Menu
User

DropVPS Team

Writer: Cooper Reagan

How to uninstall python on ubuntu 25.04

How to uninstall python on ubuntu 25.04

Publication Date

08/19/2025

Category

Articles

Reading Time

1 Min

Table of Contents

Python comes pre-installed on Ubuntu, but sometimes you may want to remove specific versions, especially if you installed them manually. Be careful when removing Python, because Ubuntu relies on it for system tools.

Step 1: Check installed Python versions

Run the following command to see which versions are installed:

python3 --version

or list all installed versions:

ls /usr/bin/python*

Step 2: Remove a specific Python version

If you installed a particular version (for example Python 3.12), you can remove it with:

sudo apt remove python3.12 -y

Step 3: Remove Python completely (not recommended)

If you want to remove Python entirely:

sudo apt remove --purge python3 -y

Then clean up:

sudo apt autoremove -y
sudo apt clean

⚠️ Warning: Removing the system’s default Python can break core Ubuntu tools like apt. It’s recommended to only remove extra versions you installed manually. That’s it! You have successfully uninstalled Python from Ubuntu 25.04

Linux VPS
U
Loading...

Related Posts