Deintegrate pods and then reinstall pods. code example
Example: sudo gem install cocoapods-deintegrate cocoapods-clean
sudo gem install cocoapods-deintegrate
sudo gem install cocoapods-clean
pod deintegrate
pod clean
rm Podfile
sudo gem install cocoapods-deintegrate
sudo gem install cocoapods-clean
pod deintegrate
pod clean
rm Podfile