Correctly removing the default Python installation I intend to replace the default Python installation with the one from Homebrew. Below is a list of steps that I want to take, but I first want to make sure that I'm not doing anything destructive, which is why I'm posting this question. :-)


The Python.framework folder is located in /System/Library/Frameworks. Is it okay to remove it? Being under System I worry that I might break something.
Remove all Python related files from /usr/bin. In my case (and probably everyone else's), I'll be removing everything given by ls -l /usr/bin | grep python:


python
python-config
python2.6
python2.6-config
python2.7
python2.7-config
pythonw
pythonw2.6
pythonw2.7

In my case I also have pip installed. The only reference to pip I found is in /usr/local/bin. To also uninstall pip I'll delete the files given by ls -l /usr/local/bin | grep pip:


pip
pip2
pip2.7



Is there anything else that I should be doing to do a complete and correct uninstall? Are there any dangers that I should be aware of?
What you're doing is destructive. Each apple update can and will either break or re-introduce parts or all of the python files to are about to delete.

Why don't you simply change your path so that the homebrew version of the tool is used?

The danger of hacking the core OS is that it's tightly bound into receipts and software update by Apple and you risk compromising the stability of the system when you're modifying it. Generally the skill level needed to augment the path is far, far less than that needed to continually manage and troubleshoot a custom OS where you've removed components from outside /Applications .



You can delete the pip files from /usr/local/bin since they are not Apple or system installed and you can re-download them or re-install them with brew once you pick your version of choice there.