Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I uninstall python3.9 which installed by macOS 64-bit Intel installer?

I installed Python 3.9.2 by using macOS 64-bit Intel installer.

I can find the path of the Python 3.9 binary file.

 ⚡  which python3.9                                                            
/usr/local/bin/python3.9

How can I uninstall it completely? Which directories and files should I remove?

like image 626
slideshowp2 Avatar asked Nov 05 '25 08:11

slideshowp2


1 Answers

You can find the installed files using the following:

List Packages with:

pkgutil --pkgs

Find files installed for your Python package

pkgutil --files yourpythonpackage.pkg

Delete the related files and run:

sudo pkgutil --forget yourpythonpackage.pkg

From my tests I can see:

pkgutil --pkgs | grep python

org.python.Python.PythonUnixTools-3.9
org.python.Python.PythonApplications-3.9
org.python.Python.PythonDocumentation-3.9
org.python.Python.PythonFramework-3.9

Files:

DIR: /Library/Frameworks/Python.framework/Versions/3.9/bin

2to3
2to3-3.9
idle3
idle3.9
pydoc3
pydoc3.9
python3
python3-config
python3.9
python3.9-config

DIR: /Applications/Python\ 3.9/
DIR: /Library/Frameworks/Python.framework/Versions/3.9

(Check these two latest from packages PythonDocumentation-3.9 and PythonFramework-3.9)

In my case just deleting /Applications/Python\ 3.9/ and /Library/Frameworks/Python.framework was enough.

like image 127
imjoseangel Avatar answered Nov 07 '25 01:11

imjoseangel