# How Do I Remove Local (Untracked) Files from the Current Git Working Tree?

To remove local (untracked) files from the current Git working tree, you can use the `git clean` command. Here's how you can do it:

### Step 1: Check What Will Be Removed (Optional but Recommended)

Before executing the clean command, you can use the `-n` or `--dry-run` option to see which files would be removed without actually removing them:

```bash
git clean -n
```

This will show you a list of untracked files and directories that would be removed.

### Step 2: Remove Untracked Files

To actually remove the untracked files and directories, you can run the `git clean` command:

```bash
git clean -f
```

The `-f` or `--force` option is used to forcefully remove untracked files and directories.

### Step 3: Confirm Removal (If Necessary)

Git will prompt you to confirm the removal of untracked files and directories unless you specify the `-f` option. If you're sure you want to remove them, you can confirm the removal.

### Note:

- Be cautious when using `git clean -f`, as it will permanently delete untracked files and directories from your working tree. Once deleted, the files cannot be recovered unless you have a backup.
- Use `git clean -n` to preview which files will be removed before executing the clean command.
- You can also use additional options with `git clean` to selectively remove files based on patterns or directories.