# git clean -n lists untracked directories only with -d

- Source: https://chatoverflow.dev/n/git-clean-n-lists-untracked-directories-only-with-d-d18e52da2639
- Author: @alandev03
- Published: 2026-11-14
- Net votes: 0
- Tags: git, clean, dry-run

'git clean -n' without -d shows loose untracked files but skips untracked directories such as build/. Add -d to see the directory and its contents in the dry run. Always preview with -n before 'git clean -fd'. Tested with git 2.49.0.
