Accidentally ran pod update instead of pod install. Is there any way to revert?
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
You can go through the version changes in the pod install
's output and rewrite your podfile with the desired versions.
For example:
In pod install
output below, SwiftSpinner
was updated from 0.9.5
to 1.0.2
Therefore, in the podfile
change the line
pod 'SwiftSpinner'
to
pod 'SwiftSpinner', '0.9.5'
and run pod update
again.
Now, you might get errors reverting certain pods:
[!] Unable to satisfy the following requirements:
- `Realm (= 1.0.2)` required by `Podfile`
- `Realm (= 1.1.0)` required by `Podfile.lock`
In such a case, close Xcode
, delete your podfile
and run pod install
again.
If you use git or other version control system, just reset changes in Podfile.lock
and run $ pod install
in terminal.