Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I installed Cocoapods version 0.28, and now I want to uninstall it from my machine. How can I do that?

share|improve this question

migrated from Dec 10 '13 at 11:14

This question came from our site for professional and enthusiast programmers.

First, determine which version(s) of Cocoapods you have installed by running this in Terminal:

gem list --local | grep cocoapods

You see output similar to this:

cocoapods (0.27.1, 0.20.2)
cocoapods-core (0.27.1, 0.20.2)
cocoapods-downloader (0.2.0, 0.1.2)

Here, I have two versions of Cocoapods installed.

To completely remove, issue the following commands:

gem uninstall cocoapods
gem uninstall cocoapods-core
gem uninstall cocoapods-downloader

If you have multiple versions installed, like I have, it will prompt you to choice a specific version or all. If you want to uninstall a specific version you can also use the -v switch as follows:

gem uninstall cocoapods -v 0.20.2

Running gem list --local | grep cocoapods again will confirm that Cocoapods has been removed.

share|improve this answer
add sudo before every command if it gives error like "You don't have write permissions for the /usr/bin directory". For e-g sudo gem uninstall cocoapods – Nasir Mahmood Dec 11 '14 at 10:18
You may also want to remove the files cocoapods creates with: rm -rf ~/.cocoapods – Adam Mar 20 '15 at 20:22

I used the following bash script to remove all the relevant gems.

for i in $( gem list --local --no-version | grep cocoapods );
    gem uninstall $i; 

Additionally delete ~/.cocoapods to remove the cache of podspecs.

rm -rf ~/.cocoapods/
share|improve this answer
This is the complete answer – Full Decent Feb 13 at 18:05
Great answer, thanks – MegaManX Apr 3 at 10:56
this is same and better: gem list --local --no-version | grep cocoapods | xargs gem uninstall – Eir Nym Apr 24 at 13:50

Easy, just run the following command to remove all or just a specific cocoapod gem:

sudo gem uninstall cocoapods
share|improve this answer

gem list --local | grep cocoapods | awk '{print $1}' | xargs sudo gem uninstall

share|improve this answer

Remove lib form Podfile, then pod install again.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.