Once you are done reinstalling go to your pod file add pods according to the version of swift and Xcode you are using and then run pod install

PS: Cocoapods REPO is nearly 350MB, so if your download is stuck don't just quit Terminal and start reinstalling again first uninstall Cocoapods and old master repo both completely, then start installing again ... this is probably what caused two instances of it in my case