Is there an easy way to get rid of everything getting generated as a result of performing an SBT build? It turns out it creates target directories all over the place. Perfor
On Linux or similar, this is better than find -name, as it won't accidentally remove any directory named target that might exist in your source code:
find . -regextype posix-awk -regex \.(/project)*/target -exec rm -r {} +
If you're running this command within a shell, you'll need to quote the regular expression, for example, for bash:
find . -regextype posix-awk -regex '\.(/project)*/target' -exec rm -r {} +
With BSD find (e.g. on Mac OS X) the command will be:
find -E . -regex \.(/project)*/target -exec rm -r {} +