> ## Documentation Index
> Fetch the complete documentation index at: https://docs.tuturuuu.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Cleaning Your Tuturuuu Clone

> How to reset your local Tuturuuu repository to a clean state.

<Info>
  This guide helps you reset your Tuturuuu repository to a clean state, which is
  useful if you encounter dependency issues or want to ensure a fresh
  development environment.
</Info>

## Prerequisites

* Ensure you have [bun](https://bun.sh/) installed. The repository pins a specific
  Bun version via the `packageManager` field in the root `package.json` (currently
  `bun@1.3.14`) — match that version so your local toolchain stays in sync.
* Node `>=22` is also required (see the `engines` field in the root `package.json`).

## Quick Cleanup (Recommended)

The repository ships a one-shot root script that performs the full cleanup for you:

```bash theme={null}
bun clean
```

This removes `bun.lock`, deletes every `node_modules` directory, and clears all
`.next` and `.turbo` build caches across the monorepo (it uses
`npkill --delete-all` under the hood). After it finishes, reinstall everything:

```bash theme={null}
bun i
```

<Tip>
  `bun clean` is the supported shortcut for the manual steps below. Reach for the
  manual steps when you want finer control over which folders are removed.
</Tip>

## Manual Cleanup (Granular Alternative)

### 1. Delete the lockfile

Remove the `bun.lock` file at the root of your repository (if it exists):

```bash theme={null}
rm bun.lock
```

### 2. Remove all `node_modules` folders

Use [npkill](https://github.com/voidcosmos/npkill) to find and remove all `node_modules` directories:

```bash theme={null}
bunx npkill
```

* In the `npkill` interface, select and delete all `node_modules` folders found in your repo.

<Tip>
  If you don't have `npkill` installed, `bunx` will download and run it
  automatically.
</Tip>

### 3. Clear build caches (optional)

Remove stale `.next` and `.turbo` build caches if you suspect they are causing
issues (the `bun clean` shortcut does this automatically):

```bash theme={null}
find . -name node_modules -prune -o \( -name .next -o -name .turbo \) -type d -exec rm -rf {} +
```

### 4. Reinstall dependencies

Install all required dependencies using bun:

```bash theme={null}
bun i
```

This will install fresh dependencies for all apps and packages in the monorepo.

<Info>
  After completing these steps, your repository should be in a clean state. You
  can now continue with the usual development workflow as described in{' '}
  <a href="/build/development-tools/development">Development</a>.
</Info>

## Troubleshooting

* If you still encounter issues, try restarting your IDE or terminal.
* Make sure your bun version is up to date: `bun upgrade`.
* If problems persist, check the [Development](/build/development-tools/development) guide or ask for help in the project discussions.
