Aye, it's such a classic mistake that people have written articles on it. This one covers how Netscape basically lost the browser war by throwing away all their code, which embodied millions of man-hours of knowledge, and writing a less-good browser from scratch. https://www.joelonsoftware.com/2000/04/06/things-you-should-never-do-part-i/ Refactoring is another matter - refactoring implies that you have tests, and that your tests continue to pass as you change the code. Refactoring and ending up with less code is a Very Good Thing, because it means you've kept the good stuff about your code (it does things that people want it to do) and lost a bunch of cruft that was costing you money to maintain or update. Removing widgets isn't refactoring - it's a straight out feature cut.