24

I want to remove specific dependency using cocoapods. if I execute pod install, other dependencies are getting updated before removing the dependency I want to delete. I just want to remove specific pod without touching any others. And I know deleting, updating any dependency also updates others. Is there any way to solve this problem?

Actually my problem is when I modify some dependency (AFNetworking for example) and run pod install it reverts back to its original version. But I don't want to lose my changes.

7
  • Cocoapod auto generate a Podfile.lock keep all framework's version. When you run pod install, it doesn't update the framework's version. Commented May 10, 2018 at 4:42
  • But I modified one dependency and when I run a command like pod install it revert back the changes I made to the original source code of the pod Commented May 10, 2018 at 4:44
  • In your case, you should fork the repo to your repo and edit. In the cocoapods file, add options to your edited repo Commented May 10, 2018 at 4:58
  • @PabloMarrufo check my answer it is working.
    – iVarun
    Commented May 10, 2018 at 5:06
  • please look at this : stackoverflow.com/questions/30372294/… Commented May 10, 2018 at 5:07

2 Answers 2

64

Remove specific pod from podfile and run below command in terminal:

pod install --no-repo-update

enter image description here

3
  • This solution correctly deleted the pod folders from the hard drive, whereas pod install on its own removed the pods from Xcode but often left the files in the project folder.
    – slushy
    Commented Aug 31, 2018 at 22:56
  • 1
    For Apple M1 chip MacBook I have used 'arch -x86_64 pod install --no-repo-update'. Commented Jul 21, 2021 at 4:50
  • It also updating existing pods, not working....
    – Naresh
    Commented Nov 2, 2021 at 12:10
-2

Remove specific pod

pictorial representation with steps detailed.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.