如何清除或清除特定的pod缓存 [英] How to clear or clean specific pod cache

查看:3248
本文介绍了如何清除或清除特定的pod缓存的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

尝试直接删除整个缓存,需要花费大量时间才能恢复所有pod。如何从缓存中查看和删除特定的pod?

Tried deleting the entire cache directly, it takes lot of time to get back all pods. How to view and remove specific pod from cache?

以下作品(更长时间提交):

Following works (longer time commit):

# delete all cached pods
`rm -rf "${HOME}/Library/Caches/CocoaPods"`  

# delete local Pods/*
rm -rf "`pwd`/Pods/"

# pod update to fetch latest. After entire cache deletion, it takes lot longer to fetch and rebuild pod cache from scratch. 
`pod update` 

只需从podfile中注释掉, pod install 再次从缓存中获取旧版本。

Just commenting out from podfile, and pod install again fetches old version from cache.

当pod很大时,pod缓存中有许多相同pod的实例可能很麻烦,其中一个正在使用的pod在一个项目中的大小> 1.5 GB,该项目使用 cocoapods1.3.1 Xcode9

Having many instances of same pod in the pod cache can be troublesome when the pod is large, one of the pod currently in use has size of >1.5 GB in a project that is using cocoapods1.3.1 with Xcode9.

推荐答案

清除特定广告连播



Clearing a specific pod

`pod cache clean --all` # will clean all pods
`pod cache clean 'FortifySec' --all` # will remove all installed 'FortifySec' pods 

示例输出pod cache clean'FortifySec',对于不使用语义版本控制的pod,这可能导致缓存中相同pod的许多副本:

Sample output of pod cache clean 'FortifySec', for pods not using semantic versioning, this could result in many copies of same pod in cache:

pod cache clean 'FortifySec'
1: FortifySec v2.2 (External)
2: FortifySec v2.2 (External)
...
...
18: FortifySec v2.2 (External)
19: FortifySec v2.2 (External)

Which pod cache do you want to remove?



完全清理(pod重置)



Complete cleanup (pod reset)

1. `rm -rf ~/Library/Caches/CocoaPods`
2. `rm -rf Pods` 
3. `rm -rf ~/Library/Developer/Xcode/DerivedData/*` 
4. `pod deintegrate` 
5. `pod setup` 
6. `pod install`

这篇关于如何清除或清除特定的pod缓存的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆