# How to clean up OpenFOAM build versions: Debug, Prof, Opt

Compilation fails when switching between git tags because the lnInclude directories are not wiped and existing binaries are there and are not re-built by wmake

	wcleanLnIncludeAll
wcleanPlatform -c


The first line deletes all the lnInclude directories that contain file links that may not be valid, once an alternative git tag is checked out.

The second line deletes the binaries for the current -c platform, defined by the \$WM_OPTIONS variable, usually Debug, Prof, Opt, or “CUSTOM” if you have customized it yourself.