$ sudo gem uninstall cocoapods
Remove executables:
pod, sandbox-pod
in addition to the gem? [Yn] Y
ERROR: While executing gem ... (Gem::FilePermissionError)
You don't have write permissions for the /usr/bin directory.
解决方案: 使用 sudo gem uninstall cocoapods -n /usr/local/bin