I rewrote from scratch once, after much deliberation and was successful. In my case, I had some extremely good reasons:<p>The original codebase was build using good old waterfall, where neither programmers nor testers had ever met a user in their life. So all the things that are good about working software kind of go out the window: There are a lot of abstractions in the code, but they didn&#x27;t match the user&#x27;s mental model, or helped in any way.<p>My users didn&#x27;t like the software at all. It might have me their requirements in theory, but not in practice.<p>The team that had built the application was pretty much gone, nobody that had any responsibility in any design decision was still in the company.<p>I actually had managed to get access to people that actually used the software, and people that supported those users, so relying on them, I was able to get a model of the world far better than the original developers ever did.<p>300K lines of Java, written over three years by 10+ developers were rewritten by a team of two in three months. All the functionality that anyone used was still there, but actually implemented in ways that made sense for user workflows.<p>I&#x27;d not have dared a rewrite had the situation been better though: Working code people want to use trumps everything.