Is it safe to delete Next.js .next folder?

<project>/.next · Safe to delete

What it is

Build output and the build cache of a Next.js app.

Can you delete it?

Yes, it is rebuilt automatically. next dev and next build recreate it.

How to clean it safely

  1. Stop the dev server.
  2. Run: rm -rf .next (inside the project folder; this skips the Trash)

Step-by-step guide: Delete node_modules safely →

Questions

Is it safe to delete <project>/.next?

Yes, it is rebuilt automatically. next dev and next build recreate it.

Let the raccoon do it, safely

Junk Raccoon finds this clutter for you, shows every file first, and keeps a one-click way back. Free to download, no account, no ads.

Download for Mac