Total rewrites, on the other hand, are never anything other than a complete and unmitigated disaster. The only way that you can possibly make a $100M rewrite successful is to do it Ship of Theseus style, where the rewritten code is incorporated into the working and actively-used production software long before the full rewrite is complete.
Even then, the full rewrite usually won't complete, so you need to make sure that project is still useful even if you only do a partial rewrite.