Is it safe to delete .next folder (Next.js)?
Build output and caches Next.js creates in a project when it runs or builds the app.
Safe
Its owner recreates it by itself when it needs it, and nothing you made is lost.
~/
- Only next to package.json
- Never inside ~/
Library
What it is
Next.js writes the compiled app, its build cache and the development server's files to the .next folder of each project. It creates the folder again the next time you start the development server or build the app. The folder stays behind in projects you no longer work on.
If it's removed
The next start of the development server and the next build are slower. The app has to be built again before it can run in production mode.
How it's removed
Moved to the Trash, where you can restore it.
The free analyzer finds it and explains it. Removing it is Pro, after a review sheet that lists every move and command. It starts checked in the Cleanup checklist, except inside Documents or Desktop.
Sources
- nextjs.org/docs/app/api-reference/config/next-config-js/distDir
- nextjs.org/docs/app/guides/ci-build-caching
Last checked on 26 Sep 2026. Every entry is written and checked by hand; the app and the command-line tool use the same words.