How to clear the .next and .turbo cache
.next is Next.js build output plus its build cache; .turbo holds Turborepo’s local task cache (Turborepo 2.0+ keeps it in .turbo/cache). Both are rebuilt automatically, and deleting them is also the classic fix for strange dev-server errors.
One project
Stop next dev first.
rm -rf .next .turbo node_modules/.cache
Remove-Item -Recurse -Force .next, .turbo, node_modules\.cache -ErrorAction SilentlyContinue
To keep the build output but drop only Next’s build cache, delete .next/cache instead.
A whole monorepo or code folder
List first, skipping anything inside node_modules:
find . -name node_modules -prune -o -type d \( -name .next -o -name .turbo \) -prune -print
Read the list. When it only shows folders you mean, replace -print with -exec rm -rf {} + and run it again.
Older Turborepo
Before 2.0, Turborepo cached in node_modules/.cache/turbo. The one-project command above covers both locations.
Measure with devdisk
devdisk is a free, read-only scanner. It finds every .next (next to a package.json) and every .turbo folder and lists them under Safe to regenerate. It never deletes anything; it only shows sizes and writes a cleanup script you read and run yourself.
curl -fsSLO https://disk.sadana.app/devdisk.py && python3 devdisk.py
iwr https://disk.sadana.app/devdisk.py -OutFile devdisk.py; py devdisk.py
Want one-click cleanup?
A planned devdisk desktop app for Mac and Windows: live treemap, cleanup that moves files to the Trash, scheduled scans. One email when it launches, with an early-supporter price. Your address is used only for that, and every email has an unsubscribe link.
FAQ
Is deleting .next safe?
Yes. next dev and next build recreate it. The next build is slower once.
Should .next or .turbo be in git?
No. Both belong in .gitignore.
Will this delete node_modules?
No. Only node_modules/.cache, a cache folder tools rebuild. Your installed packages stay.