1

I am trying to remove pod dependency for committing in to gitlab

I am referring Remove or uninstall library previously added : cocoapods when I do pod clean it is showing Unknown command: clean

pod clean

I am expecting to remove pod files while committing and after taking checkout I want to get pod file by running pod install

Jonas
  • 121,568
  • 97
  • 310
  • 388
  • You can add pods to your gitignore file. https://stackoverflow.com/a/34239746/5084797 – manishsharma93 Aug 14 '19 at 10:56
  • pod file is getting removed when I do pod deintegrate, but pod clean is not working –  Aug 14 '19 at 11:03
  • [cocoapods-clean](https://rubygems.org/gems/cocoapods-clean)'s (`pod clean`) github source appears to have been renamed, you can find it [here](https://github.com/maxerogers/cocoapods-clean) now but all it does is: `rm -rf Podfile.lock Pods *.xcworkspace`. – Arjan Aug 16 '22 at 09:38

1 Answers1

0

Please try below commands to clear all pod data. Also to ignore pod file while committing to git you can add pod folder path in .gitignore (hidden file) to ignore specific folder on code push.

pod cache clean --all
pod deintegrate

OR

rm -rf ~/Library/Caches/CocoaPods

rm -rf Pods

Also clear derived data of that app.

Community
  • 1
  • 1
Jay Thakkar
  • 1,392
  • 10
  • 19
  • I tried pod cache clean --all but .xcworkspace still exist –  Aug 14 '19 at 11:16
  • @mobileapps can you update all the commands you have used to deintegrate pod?? Also I have edited may answer. – Jay Thakkar Aug 14 '19 at 11:18
  • sudo gem install cocoapods-clean pod deintegrate pod cache clean --all Same order I used –  Aug 14 '19 at 11:22
  • Ok. Hope this url helps you https://stackoverflow.com/questions/16427421/how-to-remove-cocoapods-from-a-project – Jay Thakkar Aug 14 '19 at 11:26