How To Completely Uninstall CocoaPods from Mac

Knowing how to completely uninstall CocoaPods from a Mac can be incredibly useful, especially if you are installing a new version version and want a clean start. Considering this application level dependency manager can be so important for managing external libraries, knowing how to properly remove it to install a fresh copy can be vital for certain users.

If simply uninstalling CocoaPods by dragging and dropping the app into your Trash and emptying it doesn’t cut the mustard, there are a couple of things you can try. Additionally, the solutions below are also helpful if you have multiple versions of the software that you need to remove.

How to CocoaPods From a Mac

1. Remove CocoaPods Using Mac Terminal

For this solution, you’re going to be using Terminal. It can typically be found in your Utilities folder, but you can also find the program through a Spotlight Search in the menu bar. There are a couple of commands you will need to know, so let’s take a quick look.

Time needed: 5 minutes

To fully uninstall CocoaPods from a Mac, follow these steps:

  1. First, open Terminal.

    Terminal is normally located in the Utilities folder.

  2. With Terminal open, enter the following command to see which version(s) of CocoaPods is on your device:
    gem list --local | grep cocoapods

  3. You will get an output similar to this, which shows you which versions you have installed within the parenthesis:
    cocoapods (1.15.2, 0.20.2)
    cocoapods-core (1.15.2, 0.20.2)
    cocoapods-downloader (1.15.2, 0.1.2).

    Typing-Terminal-App-Codes

  4. Enter the following commands one at a time to uninstall CocoaPods:
    sudo gem uninstall cocoapods
    sudo gem uninstall cocoapods-core
    sudo gem uninstall cocoapods-downloader

  5. You can also uninstall specific versions through the following command. Replace the Xs with your version number:
    sudo gem uninstall cocoapods -v X.XX.X

  6. You can repeat step two to see if these commands removed CocoaPods from your Mac.

  7. You can also remove any residual files from your home directory with the following command:
    sudo rm -rf ~/.cocoapods

Hopefully these solutions work for you. You may also want to know how to completely uninstall PostgreSQL on your Mac.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.