Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Clear CocoaPods cache, re-download and re-install all pods
#!/usr/bin/env bash
rm -rf "${HOME}/Library/Caches/CocoaPods"
rm -rf "`pwd`/Pods/"
pod update
@breath103
Copy link

breath103 commented Nov 3, 2015

👍

@dmlebron
Copy link

dmlebron commented Jan 19, 2016

Thanks!

@andrewjburnett
Copy link

andrewjburnett commented Jan 28, 2016

Beautiful! This saved me some headache after moving an project between users on my mac.

@nonotest
Copy link

nonotest commented Jan 29, 2016

cheers

@ipedro
Copy link

ipedro commented Mar 13, 2016

nice!

@ngheungyu
Copy link

ngheungyu commented Jun 26, 2016

Cleaning the cache doesn't mean Xocde will read the new code! One extra tips is to delete the Derived Data to prevent compiler reading the old code. Hope it helps

@justinswart
Copy link

justinswart commented Jun 30, 2016

rm -rf ~/Library/Caches/CocoaPods; rm -rf Pods; rm -rf ~/Library/Developer/Xcode/DerivedData/*; pod deintegrate; pod setup; pod install;

@uzuume
Copy link

uzuume commented Jul 22, 2016

Thanks!

@orenk86
Copy link

orenk86 commented Aug 28, 2016

Clean, simple, perfect. Thanks!

@andj207
Copy link

andj207 commented Nov 10, 2016

It works. Thanks.

@jeantimex
Copy link

jeantimex commented Dec 8, 2016

Thanks mate, I hate caches!

@syzer
Copy link

syzer commented Aug 15, 2017

Thanks!

@cprovatas
Copy link

cprovatas commented Sep 13, 2017

<3

@ashokds
Copy link

ashokds commented Sep 26, 2017

👍 Thanks!

pod cache clear --all
pod cache clear 'alamofire'
pod cache clear 'alamofire' --all // delete all installed 'alamofire' pods

@efremidze
Copy link

efremidze commented Oct 2, 2017

Use clean instead of clear.

pod cache clean --all
pod cache clean 'alamofire'
pod cache clean 'alamofire' --all

@olgusirman
Copy link

olgusirman commented Nov 15, 2017

Thanks, I use it all the time!

@Urvish-modi
Copy link

Urvish-modi commented Jan 31, 2018

Unable to understand what happens, i command pod install with repo update and this happens.
Anyone has idea ?

screen shot 2018-01-31 at 11 05 09 am

screen shot 2018-01-31 at 11 06 04 am

@RishabhTayal
Copy link

RishabhTayal commented Apr 27, 2018

This is AWESOME! 👍

@kr-mohak
Copy link

kr-mohak commented Apr 17, 2019

Thanks!

@FDiskas
Copy link

FDiskas commented Oct 8, 2019

rm -rf ~/Library/Caches/CocoaPods Pods ~/Library/Developer/Xcode/DerivedData/*; pod deintegrate; pod setup; pod install;

@chronikum
Copy link

chronikum commented Jan 19, 2020

thank you. Thank you so much.

@msvargas
Copy link

msvargas commented Apr 23, 2020

thanks!

@EmmanuelC19
Copy link

EmmanuelC19 commented May 20, 2020

thanks ! works perfect !!

@erdemildiz
Copy link

erdemildiz commented Oct 16, 2020

rm -rf ~/Library/Caches/CocoaPods Pods ~/Library/Developer/Xcode/DerivedData && pod deintegrate && pod install

@pro100svitlo
Copy link

pro100svitlo commented Dec 29, 2020

THANK YOU ❤️

@thamtumeoden13
Copy link

thamtumeoden13 commented Jul 15, 2021

thank you, it's save my life

@lornebb
Copy link

lornebb commented Oct 28, 2021

Still working in Oct. 2021. Thanks!

@DavidAPears
Copy link

DavidAPears commented Dec 6, 2021

Still working in Dec '21. Thanks

@coderjonny
Copy link

coderjonny commented Apr 8, 2022

Still working in Apr 2022.. thanks!

@mikeest1972
Copy link

mikeest1972 commented Apr 8, 2022

For M1 mac pod update should change to arch -x86_64 pod update. Here is a version of script for M1 mac users link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment