Apparently at some point I installed cocoapods via sudo gem install cocoapods
. This seems to have placed the cocoapods binaries in /usr/bin
. It seems at some macOS updated this directory became read only. Now, I would like to remove this old version but when I try to execute sudo gem uninstall cocoapods
I get the following error:
Fire:~ root# sudo gem uninstall cocoapodsIgnoring ffi-1.15.5 because its extensions are not built. Try: gem pristine ffi --version 1.15.5Remove executables: pod, sandbox-podin addition to the gem? [Yn]ERROR: While executing gem ... (Gem::FilePermissionError) You don't have write permissions for the /usr/bin directory.
As you can see I've already tried from the root user via sudo -i
but to no success. I've also tried disabling SIP and then executing it as root, but alas to no success. Is there any way to remove this folder or a clean installation is the only possibility?