git clean deletes files that git does not track. There is no undo. That is why it deserves a dry run.
git clean -n -d
-n (or --dry-run) only shows what would be removed and deletes nothing. -d includes untracked directories, because by default git does not recurse into them. Read the list. If it matches what you expect, run the real thing:
git clean -f -d
By default git refuses to delete without -f, thanks to the clean.requireForce setting, which is on unless you changed it. The dry run ignores that setting because nothing is deleted anyway.
Add -x and git also removes files that are in your .gitignore, so build output, caches, and possibly the local config file with your passwords in it. The docs mention this as a way to get a pristine tree for a clean build.
The caveat: files removed by git clean never went through git, so no reflog can bring them back. And a nested git repository inside your project needs a second -f before git touches it.
Further reading: git clean documentation, On this site: git diff –staged shows what your commit will contain, On this site: put -delete last in find, or it deletes more than you think