deleting files in the usr/bin directory

I'm trying to uninstall python fully and one file is left in my usr/bin directory.


I've tried previous workarounds to delete this (restarting in recovery mode and disabling SIP (System Integrity Protection)) but with the newer versions of mac os you still cant delete the file.


is there and easy way to delete a file in this directory?

MacBook Pro 14″, macOS 13.0

Posted on Mar 31, 2023 3:12 AM

Reply
Question marked as Top-ranking reply

Posted on Mar 31, 2023 5:10 AM

The short answer is no, you have no privileges to remove a file from the System read-only, code-signed Volume. Neither SIP, sudo, or root will work. That 168K Python3 file remains.


Xcode and the Command Line Tools for Xcode place a /usr/bin/python3 binary, but neither provides an uninstaller to remove it. Other sources of Python3 don't have the privileges to write into /usr/bin, and with Apple Silicon Macs, homebrew puts those binaries in /opt/homebrew/bin, and the python.org installer into /usr/local/bin as links to its /Library framework.

Similar questions

4 replies
Question marked as Top-ranking reply

Mar 31, 2023 5:10 AM in response to spellz-mac

The short answer is no, you have no privileges to remove a file from the System read-only, code-signed Volume. Neither SIP, sudo, or root will work. That 168K Python3 file remains.


Xcode and the Command Line Tools for Xcode place a /usr/bin/python3 binary, but neither provides an uninstaller to remove it. Other sources of Python3 don't have the privileges to write into /usr/bin, and with Apple Silicon Macs, homebrew puts those binaries in /opt/homebrew/bin, and the python.org installer into /usr/local/bin as links to its /Library framework.

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

deleting files in the usr/bin directory

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.