How to uninstall older version of the Cocoapods from the Mac Machine?
Overview:
CocoaPods is an application-level dependency manager for the Swift
and Objective-C
programming languages that helps you manage library dependencies for your Xcode projects.
However, there may come a time when you need to uninstall an older version of CocoaPods from your system.
Whether it’s to clean up your development environment or to resolve conflicts with newer versions.
List Installed versions of CocoaPods:
First, determine which version(s) of Cocoapods you have installed by running this command in Terminal app:
gem list --local | grep cocoapods
You see output similar to this:
cocoapods (1.15.2, 1.14.3, 1.13.0, 1.12.1, 1.11.3)
cocoapods-core (1.15.2, 1.14.3, 1.13.0, 1.12.1, 1.11.3)
cocoapods-deintegrate (1.0.5)
cocoapods-downloader (2.1, 1.6.3)
cocoapods-plugins (1.0.0)
cocoapods-search (1.0.1)
cocoapods-trunk (1.6.0)
cocoapods-try (1.2.0)
Uninstall Specific Version of CocoaPods:
Now you have all the installed cocoapods version. Identify the version of the CocoaPods that you wish to uninstall.
Run the following command to uninstall the specific version of CocoaPods.
sudo gem uninstall cocoapods -v VERSION_NUMBER