How To Uninstall Python
Có thể bạn quan tâm
Python is uninstalled differently in Windows, macOS, and Linux.
Windows
To uninstall Python from Windows, follow these steps:
- Navigate to the “Control Panel.”
- Click “Uninstall a program,” and a list of all the currently installed programs will be displayed.
- Select the Python version that you want to uninstall, then click the “Uninstall” button above the list. This has to be done for every Python version installed on the system.
MacOS
For Python 3 and above, first perform the following steps:
- Go to the “Finder.”
- Click “Applications” in the menu on the left.
- Find the Python folder with the version number you want to uninstall, right-click it, and select the “Move to Trash” option.
Depending on the process of installation, Python might or might not be present in the “Applications” folder. If it’s not, perform the steps in the next section.
Removing additional files from the “Terminal”
Moving the Python application to trash will not remove Python entirely. Furthermore, a built-in Python distribution might not appear in the “Applications” folder. So we’ll have to use the “Terminal” to uninstall it manually.
First, open the “Activity Monitor” and close all processes related to Python in the “Memory” tab. One such process is the “Python Launcher.” Now we can proceed to the “Terminal.”
- Open the “Terminal” and navigate to your Library folder from your root directory:
Here, we can list the current folders in our Library using the ls command. Look for a folder named Python. Remove this folder with super-user privileges:
sudo rm -rf PythonNote: The operation requires your password in order to be completed.
Additionally, three more main directories have to be handled in order to remove Python. Move back to your root user directory and perform the following commands:
sudo rm -rf “/Applications/Python” sudo rm -rf /Library/Frameworks/Python.framework sudo rm -rf /usr/local/bin/pythonNote: We don’t recommend this step for novice macOS users. The way Python files are distributed in your Library and cache can differ based on your use, and so, extra files might have to be deleted, which you can search for in the “Finder” or manually in the “Terminal.”
Linux
To remove Python and its associated dependencies, you can use the following command:
apt-get -y remove --auto-remove python3.11This command removes the Python 3.11 package and any other packages that were installed as dependencies but are no longer needed. You can replace python3.11 with any desired version that you wish to uninstall.
Let's test the above command and verify whether it can uninstall Python or not. After running the command, please execute the python --version command to confirm the uninstallation of Python
Terminal 1 TerminalLoading...Relevant Answers
Explore Courses
Free Resources
Copyright ©2026 Educative, Inc. All rights reservedTừ khóa » Gỡ Cài đặt Python
-
Cách để Gỡ Cài đặt Python - WikiHow
-
Hướng Dẫn Chi Tiết Cách để Gỡ Cài đặt Python - Sotay.Mobi
-
Làm Cách Nào để Loại Bỏ Hoàn Toàn Python Khỏi Máy Windows?
-
Cách Gỡ Cài đặt Hoàn Toàn Python Khỏi Windows
-
Cách Gỡ Cài đặt Python3 Trong MacOS
-
Ae Cho Hỏi Gỡ Bỏ Python Cũ Ntn?
-
Gỡ Cài đặt Python được Xây Dựng Từ Nguồn?
-
Cách để Bạn Gỡ Cài đặt Python3 Trong MacOS
-
How To Uninstall Python 3 From Windows 10/8/7 - YouTube
-
Làm Cách Nào để Xóa Hoàn Toàn Python Khỏi Máy Windows?
-
▷ Cách Xóa Python Khỏi Mac »
-
How To Uninstall Python
-
Completely Uninstall Python 3.10 On Mac - Stack Overflow
-
How To Uninstall Python Packages - ActiveState