Skip to content

Instantly share code, notes, and snippets.

@nabilfreeman
Last active November 9, 2020 10:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nabilfreeman/d4af1b7be7291baec5be44aae69806d4 to your computer and use it in GitHub Desktop.
Save nabilfreeman/d4af1b7be7291baec5be44aae69806d4 to your computer and use it in GitHub Desktop.
How to delete things from /usr/bin
# In macOS Catalina onwards `/usr/bin` is protected. Before you would only need to run a root shell to make any changes. Now there is something extra to do.
# Let's say I want to run this command:
# sudo rm -rf /usr/bin/python3
# Deleting something will give you the error:
# rm: /usr/bin/python3: Read-only file system
# To get around this you need to first run:
sudo mount -uw /
# Then the above command will work as expected.
sudo rm -rf /usr/bin/python3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment