yarn cache list [—pattern]

    yarn cache list —pattern <pattern> 将列出匹配指定模式的已缓存的包。

    示例:

    yarn cache dir
    yarn cache clean [<module_name…>]

    运行此命令将清除全局缓存。 将在下次运行 yarn 或 时重新填充。 Additionally, you can specify one or more packages that you want to clean.

    设置 cache-folder 来配置缓存目录。

    你还可以通过环境变量 YARN_CACHE_FOLDER 指定缓存目录︰