Where Does Turborepo Store Its Cache?
Turborepo caches task outputs in .turbo/cache at the repo root. Relocating it, worktree sharing, and remote cache notes.
Last updated
Turborepo stores every cached task result in .turbo/cache at the repository root. Hit the same inputs twice and the second run restores outputs instead of recomputing them. The directory is pure derived data: safe to delete, painful to lose on a slow CI box.
Three knobs move it: the cacheDir key in turbo.json, the --cache-dir flag, or TURBO_CACHE_DIR in the environment. Git worktrees share the main checkout's cache automatically unless you set an explicit relative cacheDir. Keep whatever you choose in .gitignore.
Where Turborepo stores this, by platform
.turbo\cache
At the monorepo root. Override per run with turbo run build --cache-dir=.\my-cache. Age and size caps come from TURBO_CACHE_MAX_AGE and TURBO_CACHE_MAX_SIZE.
.turbo/cache
Same root-relative role. Linked git worktrees reuse the main checkout's cache until you pin an explicit cacheDir in turbo.json.
.turbo/cache
Mirrors macOS. Remote caching lives outside this folder entirely, configured through the dashboard or TURBO_API, so wiping local cache never touches shared results.
Frequently asked questions
How do I clear the Turborepo cache?
Delete the .turbo/cache directory at the repo root, or run tasks with --force to bypass it once. Remote cache entries stay put either way. Reconsider cache inputs first if stale hits keep recurring.
Do git worktrees share one Turborepo cache?
Yes, linked worktrees automatically reuse the main worktree's .turbo/cache. Restored outputs keep absolute paths, so set an explicit relative cacheDir per worktree if cross-checkout paths leak into your artifacts.
Notice an outdated path? Let us know.