I understand that the following command will update a single pod: pod update <podname>
. However this also updates the dependencies of other pods (pods that were not included in the update command) that you have previously installed. Is there a way to update a single pod and leave all other dependencies alone?

- 3,897
- 3
- 22
- 28
-
2To understand the difference you **must** first understand what a [`podfile.lock`](https://guides.cocoapods.org/using/using-cocoapods.html#what-is-podfilelock) is. See the link and the video it references. – mfaani Jul 22 '19 at 22:48
9 Answers
Make sure you have the latest version of CocoaPods installed.
$ pod update PODNAME
was introduced recently.
See this issue thread for more information:
$ pod update
When you run
pod update SomePodName
, CocoaPods will try to find an updated version of the pod SomePodName, without taking into account the version listed inPodfile.lock
. It will update the pod to the latest version possible (as long as it matches the version restrictions in your Podfile).If you run pod update without any pod name, CocoaPods will update every pod listed in your Podfile to the latest version possible.

- 7,528
- 9
- 56
- 96

- 19,544
- 7
- 73
- 84
-
24Thanks for the response @mattt, I've got the latest version of CocoaPods(0.34.2) and I did try `$ pod update SomePodName`. However, there are some cases where CocoaPods will also try to update the dependencies of other pods. Long story short, SomePodName isn't the only pod that will get updated in some cases. – ken Oct 14 '14 at 02:30
-
@ken Of course. If a pod's dependencies change between versions, it follows that those dependencies would be updated accordingly. – mattt May 21 '15 at 17:16
-
@ShamsiddinSaidov That's a different question entirely. If you have a new question, you should ask that separately. – mattt May 21 '15 at 17:17
-
2@mattt, the dependencies I was referring to was not the dependencies of the pod that was being updated. I think I didn't structure the question well enough but assuming we update pod A, some other pods that are not the dependencies of pod A gets updated as well. This is an old question by the way so not sure if this has been fixed since then.. – ken May 21 '15 at 23:14
-
@ken In my case other pods update themselves no matter what for some reason. – Andrei Konstantinov Aug 04 '15 at 12:08
-
-
-
-
@ken I think I found it. You need to use `pod install` instead of `pod update`. Yes. It still updates bunch of files in Pods directory, BUT if you'll look closely: it's all service files for pods - not the real code - so the only changed pod will be the one you deleted from Podfile. – Andrei Konstantinov Aug 19 '15 at 09:30
-
I too am facing problem while trying to update only one pod. It updates all the pods. I have some local pods too and it tries even to update that...not sure what need to be done. I tried 'pod install' too but no luck. – anoop4real Oct 13 '15 at 08:50
-
11`pod update` touches everything. It doesn't do what it says on the tin, and it's very frustrating. Randomly removes headers from other pods you've not told it to touch, etc. – Luke Nov 24 '15 at 08:55
-
I get this error `Ignoring ffi-1.14.2 because its extensions are not built. Try: gem pristine ffi --version 1.14.2 [!] The `podfile` Pod is not installed and cannot be updated` what do i need to do to fix?! – Learn2Code Sep 28 '22 at 14:38
To install a single pod without updating existing ones-> Add that pod to your Podfile and use:
pod install --no-repo-update
To remove/update a specific pod use:
pod update POD_NAME
Tested!

- 10,896
- 3
- 53
- 89
It's 2015
So because pod update SomePod
touches everything in the latest versions of cocoapods, I found a workaround.
Follow the next steps:
Remove
SomePod
from thePodfile
Run
pod install
pods will now remove SomePod
from our project and from the Podfile.lock
file.
Put back
SomePod
into thePodfile
Run
pod install
again
This time the latest version of our pod will be installed and saved in the Podfile.lock
.

- 18,668
- 21
- 96
- 131
-
You can also use the trick I answer here http://stackoverflow.com/questions/29901337/is-it-possible-to-install-a-specific-pod/34193560#34193560 – Qiulang Mar 03 '16 at 03:16
-
20You can also do `pod update somepod anotherpod thirdpod` to update multiple pods at once :) – Entea Apr 05 '16 at 12:56
-
This is very clever. You're doing them in two independent steps and relying the podfile.lock to keep other dependencies intact. I just wonder if `SomePod` is updated to its latest dependencies wouldn't it update a shared dependency of `anotherPod` to the latest? Won't that happen regardless of what's in podlock? Otherwise it won't be able to satisfy the requirements of `SomePod` – mfaani Sep 16 '19 at 20:30
just saying:
pod install
- for installing new pods,
pod update
- for updating existing pods,
pod update podName
- for updating only specific pod without touching other pods,
pod update podName versionNum
- for updating / DOWNGRADING specific pod without touching other pods

- 994
- 11
- 18
-
-
Sometimes it doesn't, I don't know why. Workout solution: 1. Remove the specific pod from Podfile 2 .pod install 3. Re-add specific pod to Podfile 4. pod install – yonivav May 12 '20 at 21:46
You might not be able to get 100% isolation. Because a pod may have some shared/common dependencies and if you attempt to update your single pod, then it would update the dependencies of other pods as well. If that is ok then:
tl;dr use:
pod update podName
Why? Read below.
pod update
will NOT respect thepodfile.lock
. It will override it — pertaining to that single podpod install
will respect thepodfile.lock
, but will try installing every pod mentioned in the podfile based on the versions its locked to (in the Podfile.lock).
This diagram helps better understand the differences:
From here
The major problem comes from the ~>
aka optimistic operator.
Using exact versions in the Podfile
is not enough
Some might think that specifying exact versions of their pods in their Podfile
, like pod 'A', '1.0.0'
, is enough to guarantee that every user will have the same version as other people on the team.
Then they might even use pod update
, even when just adding a new pod, thinking it would never risk updating other pods because they are fixed to a specific version in the Podfile
.
But in fact, that is not enough to guarantee that user1 and user2 in our above scenario will always get the exact same version of all their pods.
One typical example is if the pod A
has a dependency on pod A2
— declared in A.podspec
as dependency 'A2', '~> 3.0'
. In such case, using pod 'A', '1.0.0'
in your Podfile will indeed force user1 and user2 to both always use version 1.0.0 of the pod A, but:
- user1 might end up with pod
A2
in version3.4
(because that wasA2
's latest version at that time) - while when user2 runs
pod install
when joining the project later, they might get podA2
in version3.5
(because the maintainer ofA2
might have released a new version in the meantime). That's why the only way to ensure every team member work with the same versions of all the pod on each's the computer is to use thePodfile.lock
and properly usepod install
vs.pod update
.
The above excerpt was all derived from pod install vs. pod update
I also highly recommend watching what does a podfile.lock
do

- 33,269
- 19
- 164
- 293
-
I get this error `Ignoring ffi-1.14.2 because its extensions are not built. Try: gem pristine ffi --version 1.14.2 [!] The `podfile` Pod is not installed and cannot be updated` what do i need to do to fix?! – Learn2Code Sep 28 '22 at 14:38
-
@Learn2Code I just ran on `pod install` on an M1 Mac. I got the same message. But it's not an error. It's a warning... – mfaani Sep 28 '22 at 21:01
Just a small notice.
pod update POD_NAME
will work only if this pod was already installed. Otherwise you will have to update all of them with
pod update
command

- 930
- 9
- 17
-
You can still use `pod install` first, which will install only the missing one(s), without touching the others. Although there's no use case for wanting to update a pod that you haven't installed, is there? – aramusss Dec 18 '19 at 10:48
I'm using cocoapods version 1.0.1
and using pod update name-of-pod
works perfectly. No other pods are updated, just the specific one you enter.

- 3,584
- 4
- 32
- 88
This is a bit of an outlier and not likely to be what the OP was dealing with, but pod update <podname>
will not work in all cases if you are using a local pod on your computer.
In this situation, the only thing that will trigger pod update
to work is if there is a change in the podspec file. However, making a change will also allow for pod install
to work as well.
In this situation, you can just modify something minor such as the description or summary by one letter, and then you can run the install or update command successfully.

- 35,668
- 12
- 125
- 132
pod update POD_NAME
will update latest pod but not update Podfile.lock
file.
So, you may update your Podfile with specific version of your pod e.g pod 'POD_NAME', '~> 2.9.0'
and then use command pod install
Later, you can remove the specific version naming from your Podfile and can again use pod install
. This will helps to keep Podfile.lock
updated.

- 7,251
- 5
- 49
- 80