美文网首页
彻底卸载CocoaPods

彻底卸载CocoaPods

作者: ShenYj | 来源:发表于2020-07-09 22:37 被阅读0次

一般情况下需要卸载Cocoapods只需要执行$ sudo gem uninstall cocoapods即可, 但通常情况下我们很少会需要卸载Cocoapods, 往往是在排查问题无效需要重新部署环境时才会需要这个环节, 下面是我在处理Cocoapods问题时尝试过最有效的清理方式

1. 移除pod组件
shenyj@ShenYj-MBP ~ % which pod
/usr/local/bin/pod
shenyj@ShenYj-MBP ~ % sudo rm -rf /usr/local/bin/pod

2. 移除 RubyGems 中的 Cocoapods程序包
$ sudo gem uninstall cocoapods 
3. 查看本地安装过的Cocoapods相关内容, 并彻底清除:
$ gem list --local | grep cocoapods
shenyj@ShenYj-MBP ~ % gem list --local | grep cocoapods
cocoapods-core (1.9.1)
cocoapods-deintegrate (1.0.4)
cocoapods-downloader (1.3.0)
cocoapods-plugins (1.0.0)
cocoapods-search (1.0.0)
cocoapods-stats (1.1.0)
cocoapods-trunk (1.4.1)
cocoapods-try (1.2.0)
4. 然后逐个删除:
shenyj@ShenYj-MBP ~ % sudo gem uninstall cocoapods-core
Successfully uninstalled cocoapods-core-1.9.1
shenyj@ShenYj-MBP ~ % sudo gem uninstall cocoapods-deintegrate
Successfully uninstalled cocoapods-deintegrate-1.0.4
shenyj@ShenYj-MBP ~ % sudo gem uninstall cocoapods-downloader
Successfully uninstalled cocoapods-downloader-1.3.0
shenyj@ShenYj-MBP ~ % sudo gem uninstall cocoapods-plugins
Successfully uninstalled cocoapods-plugins-1.0.0
shenyj@ShenYj-MBP ~ % sudo gem uninstall cocoapods-search
Successfully uninstalled cocoapods-search-1.0.0
shenyj@ShenYj-MBP ~ % sudo gem uninstall cocoapods-stats
Successfully uninstalled cocoapods-stats-1.1.0
shenyj@ShenYj-MBP ~ % sudo gem uninstall cocoapods-trunk
Successfully uninstalled cocoapods-trunk-1.4.1
shenyj@ShenYj-MBP ~ % sudo gem uninstall cocoapods-try
Successfully uninstalled cocoapods-try-1.2.0






相关文章

网友评论

      本文标题:彻底卸载CocoaPods

      本文链接:https://www.haomeiwen.com/subject/krbecktx.html