Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Accidentally ran pod update instead of pod install. Is there any way to revert?

Tags:

cocoapods

I accidentally ran pod update instead of pod install, and now I have compile errors in my project.

Is there any easy way of reverting to my previous pods?

I'm thinking of hacking it -- I have my Podfile.lock file under source control, so I can grab the version numbers off that, then lock down the Podfile to those numbers e.g.:

pod 'AFNetworking', '2.6.3'

But is there a simple command like pod revert or pod undo or something?

Otherwise I'll probably just suck it up and update my project code to be compatible to the new pods.

like image 806
tomblah Avatar asked Jun 28 '16 06:06

tomblah


2 Answers

If you use git or other version control system, just reset changes in Podfile.lock and run $ pod install in terminal.

like image 188
Alex Sh. Avatar answered Sep 27 '22 22:09

Alex Sh.


The best way is to remove the pods directory from your project and update and install it again.

rm -rf Pods 
bundle exec pod repo update
bundle exec pod install
like image 28
Deepjyot Kaur Avatar answered Sep 27 '22 22:09

Deepjyot Kaur