Rebuild, Refactor, Replatform or Keep: How to Decide What Your Software Actually Needs
Product development
Software modernization
Software costs & planning
Updated: November 27, 2026 | Published: November 26, 2026
Key Takeaways
Preserve what still works, then choose the least disruptive change that solves a measurable business problem; a full rebuild has to earn its place against keeping, refactoring and replatforming.
When your evidence points different ways, decide by the one business problem that has to go: rule out every option that can't remove it, then weigh what's left on cost and risk.
Keeping a system is a real option when it still does its job and its problems cluster in a few fixable places. Keeping it safely takes work: version control, a staging environment, security updates and a date to review the decision.
A full rewrite earns its cost when the domain model no longer fits the business, or when keeping the system costs more over your planning horizon than rebuilding plus the risk of moving. For a product customers use every day, that usually means replacing it in stages.
The person who approves the budget needs one page: the business problem, every option including keeping, the cost and risk of each over the same horizon, and the first step you're asking to fund.
Your engineers want to rebuild the platform, the roadmap keeps slipping, and customers use the product every day, so the argument has become rebuild vs refactor. Deloitte's 2026 Global Technology Leadership Study puts technical debt at 21% to 40% of an organization's IT spending. Your decision turns on what that cost stops the business from doing.
This guide's rule: keep what still works, and change only what's stopping the business, in the way that disrupts customers and the roadmap least. A rebuild can still win, but on evidence, not because the code is old or frustrating.
You'll get the 4 options, the 8 measures that decide between them, a way to gather them in 2 weeks, a method for when they disagree, and a one-page business case.
It draws on DBB Software's modernization work for clients including WM Strategy and DispatchHealth.
Rebuild vs Refactor: Which Option Fits Your Software?
Keep and stabilize software that still does its job, and refactor when changes keep getting slower in specific parts of the code. Replatform when the runtime, framework or hosting is the problem, and rebuild when the domain model no longer fits the business or keeping the system costs more than replacing it. The domain model is how the software represents the business: its customers, products, prices and rules.
Each option changes something different and fits a different situation:
Option | What changes | Fits when |
|---|---|---|
Keep and stabilize | How the system is run: version control, testing, monitoring, security updates | It still does its job and its problems cluster in a few places |
Refactor | The structure of the code, in small steps, with the same behavior | Changes keep getting slower in specific modules, but the data model fits |
Replatform | A new runtime, framework, major version or hosting, with the business logic kept | Cost or incidents cluster in the platform, or its support is ending |
Rebuild | The whole system, written again, often part by part | The domain model no longer fits, or keeping costs more than replacing |
The line between keeping and replatforming is the platform's support. Security updates within a supported version are part of keeping. A move to a new major version, framework or host is a replatform, because it needs migration work and testing of its own. Keeping and stabilizing is also called retaining or maintaining, and a rebuild is also called a rewrite.
A fifth route is to replace the system with an off-the-shelf product. It fits when a mature product already does most of what your software does and that software isn't what sets you apart. You give up control of the roadmap and the data model, so weigh it as a build-or-buy decision of its own.
When your system fits more than one row, the deciding question is which business problem has to go first.
The Evidence That Decides Between Keeping, Refactoring and Rebuilding
Gather 8 measures before you choose, from running cost and change difficulty to who still understands the system and what the roadmap is waiting for. Together they turn technical debt, the extra work you pay for later because of earlier shortcuts or outdated choices, into numbers you can compare.
Collect this evidence for each measure:
Measure | Evidence | What it shows |
|---|---|---|
Running cost | Hosting, support hours, incident time | The ongoing cost of keeping |
Change difficulty | Lead time, release frequency, defects by module | Whether refactoring can help, and where |
Disruption | Outages, affected customers, failed transactions | What the status quo costs customers |
Investment | Engineering scope, migration work, testing | The one-time cost of each option |
Replacement risk | Dependencies, data to move, customer continuity | Whether a rebuild is safe to attempt |
Time to value | When savings or improvements arrive | How the options compare over time |
Knowledge | Who understands the system, documentation | What a rebuild would lose |
Roadmap held back | Features delayed or dropped | The cost no invoice shows |
For change difficulty, use the definitions in the software delivery metrics from DevOps Research and Assessment (DORA), so your numbers mean the same thing from one quarter to the next. Change lead time, for example, is the time a change takes to go from being committed to version control to running in production.
Read each measure against your own baseline. A fixed rule, such as rebuilding once a set share of releases needs a hotfix, borrows a threshold from someone else's system. The trend in your own numbers says far more about yours.
How to Gather the Evidence in 2 Weeks
Give one person 2 weeks to fill in the 8 rows from records you already have, and ask each owner for their part:
Version history and deployment logs (engineering lead): change lead time, release frequency, how often a release needs a fix, and which modules change most.
Issue tracker and incident log (engineering and support): defects by module, outages, the customers they reached and the transactions that failed.
Hosting bills and timesheets (finance): running cost, including the hours spent keeping the system alive.
The roadmap (product lead): features delayed or dropped because of the system, and what each one was worth.
The team (engineering manager): who can change each part safely, and what's written down.
If nobody on your side can pull the engineering rows, ask your developers or an outside reviewer for them, and ask to see the data behind each number. A row you still can't fill is where a rebuild decision becomes a guess, so mark it and measure it before you decide.
What to Do When the Evidence Points to Different Options
When your measures disagree, find the one business problem that has to go and rule out every option that doesn't remove it. Then choose the least disruptive of the remaining options that fits your budget and risk. That problem is your binding constraint: the measurable limit whose removal changes what the business can do.
The method works from the business problem to the option, so the technology never makes the choice on its own:
Name the binding constraint. It's measurable and it's a business problem: a feature customers need that can't ship, incidents that interrupt sales, security support that ends on a known date, or a running cost that grows faster than revenue. When several constraints compete, compare their business impact, urgency, risk of delay and reversibility. Record why one takes priority: a security exposure, a contractual obligation or customer harm you can't undo can outrank a larger cost.
Treat the other measures as limits, not votes. Migration risk, customer continuity and who understands the system set how much risk and disruption you can accept. They narrow the options without picking one.
Rule out the options that can't remove the constraint. Keeping can't fix a framework whose support is ending, since the fix is a move to a newer version, and refactoring can't fix a data model the business has outgrown.
Choose the least disruptive option left that fits your budget and risk limits. Disruption is what customers, the roadmap and the team will feel, and it depends on the system more than on the option: a framework upgrade can disrupt more than a careful partial rebuild. If 2 options qualify, prefer the one you can do in steps and stop partway.
In short, each step narrows the field until one option is left:

Here's how the method settles 3 typical conflicts:
The platform is ageing, but the business logic still fits. Maintenance keeps getting more expensive, the framework is outdated, and moving everything would be risky. The framework is the problem to remove, so replatform in place, keep the business logic and refactor the modules where maintenance time concentrates; a rebuild would add the migration risk without fixing anything more. If the framework has no upgrade path, that layer gets rewritten module by module.
The business has outgrown the software's model. The stack is supported, but a new way of selling or pricing has no natural place in the system, and customers use it daily. Keeping and refactoring can't fix the model, so rebuild the part that holds it as a staged replacement and keep the rest.
A small product that nobody can change safely. With few customers, little knowledge left and a model that no longer fits, a full rebuild with one planned switchover can cost less than running 2 systems side by side. That holds as long as there's little data to move and customers can accept a short, scheduled window.
Write the binding constraint down, because it becomes the first line of your business case.
When Keeping a Legacy System Beats Replacing It
Keep a legacy system when it still does its job, its problems sit in a few fixable places, and the people who understand it are still on the team. What keeping costs, from held-back roadmap items to incidents, goes in the same comparison as the cost of a legacy system replacement.
The strongest case against keeping is that knowledge leaves and the gap to a modern system grows, so waiting makes replacement harder. That's true of a system kept by default.
One kept on purpose has a cost line, an owner and a review date. If the knowledge risk climbs, replacement can start with the parts only 1 or 2 people can still change.
What Keeping a System Safely Takes
Maintaining a legacy system safely takes 6 things: version control, a staging environment, security updates within supported versions, monitoring of the failures customers feel, written knowledge, and a date to review the decision.
Version control and a staging environment: every change is tracked and tested before it reaches customers.
Security updates within supported versions: apply patches and minor updates while the runtime, framework and dependencies are supported. Once a version's support ends, its security fixes stop, and staying safe means moving to a newer version, which is a replatform step. PHP's end-of-life page warns that older versions "may expose you to security vulnerabilities and bugs that have been fixed in more recent versions of PHP". The US Cybersecurity and Infrastructure Security Agency (CISA) also lists unsupported software as a bad practice for critical infrastructure.
Monitoring of what customers feel: errors, timeouts and failed transactions, caught before the support tickets arrive.
Written knowledge: how the system is deployed, where its risky parts are and who to ask.
A review date: once a year, or whenever running cost, incidents or change difficulty shifts, check whether keeping is still the right call.
If any of the 6 is missing, add it first, since each one also makes refactoring, replatforming or rebuilding safer later.
DBB took this route with WM Strategy, a market research firm that sells reports through a Magento store. Rather than rebuild the store, we worked in steps:
Keep and stabilize: we added Git and a separate staging environment on the existing server.
Replatform the runtime: PHP 7.4 was past its end of life, and the Magento upgrade needed a newer one. We moved the store to PHP 8.1 in Docker "without a disruptive server replacement".
Continue on the same path: PHP 8.1 has since reached its own end of life, and the move to PHP 8.4 is next.
The recurring 502 outages that had been interrupting report sales are gone, and the Magento upgrade is under way.
When to Refactor, and When to Replatform Instead
Refactor when the code is the problem and the platform is fine, and replatform when the platform is the problem and the code's logic is sound. The refactor vs replatform question settles once you know where incidents and slow changes concentrate.
Signs Refactoring Will Pay Off
Refactoring pays off when change lead time keeps rising and defects cluster in specific modules while the data model still fits the business. Before you change anything, write tests that pin down what the code does today, the approach Michael Feathers set out in Working Effectively with Legacy Code. Those tests are what let you change the structure without changing the behavior. Then refactor the modules your evidence points to and leave the rest.
Signs You Need to Replatform
Replatform when the runtime, framework or hosting is at or near the end of its support, or when cost and incidents cluster in the platform, not in your own code. End-of-support dates are public: PHP 8.1, for example, reached its end of life on 31 December 2025.
In cloud migration, "replatform" also means a lighter move to the cloud, and moving workloads to the cloud is a decision of its own.
A replatform can run alongside feature work, even on a large codebase. GitHub's upgrade from Rails 3.2 to 5.2 "took a year and a half", and the team couldn't "stop feature development or bug fixes in order to upgrade Rails".
Instead, it made the application "dual boot" on both versions, so upgrade changes shipped regularly. Each new version then went to "a percentage of production servers" until its error rate matched the old one.
For Uniform, a composable digital experience platform, the goal was to reduce performance bottlenecks and break up components that were hard to change. DBB combined refactoring and replatforming in one project, delivered inside Uniform's own sprints:
Replatforming: we led a phased migration of Uniform's projects to React Server Components.
Refactoring: along the way, we broke large legacy components into smaller, maintainable units.
Refactoring and replatforming both keep the business logic you already trust, which is why they come before a rebuild whenever they solve the problem.
When a Full Rewrite Is Worth It, and When to Replace in Stages
A full rewrite is worth its cost when one of 2 conditions is true:
The domain model no longer fits. Each new business rule needs workarounds across many modules, or the data the business now runs on has no natural place in the system.
Keeping costs more than replacing. Over your planning horizon, keeping the system costs more than rebuilding it plus the risk of moving to it. A stack nobody can hire for, or security gaps no upgrade can close, can tip that balance.
These are the strongest reasons to rewrite, and when one of them is your binding constraint, the rebuild has earned its place. Rewrites still fail in predictable ways:
Customers expect everything the old system did, including behavior nobody wrote down.
Hidden business rules surface late, after the plan and the budget are set.
The old system keeps changing while the new one is being built.
A big rewrite freezes the roadmap, and customers wait for features while the new system catches up.
In his 2000 essay on Netscape, Joel Spolsky called the decision to rewrite code from scratch "the single worst strategic mistake that any software company can make".
When to Replace a System in Stages
Replace a system in stages when it's large, its data is hard to move, or customers can't accept a planned window. The choice covers 2 risks: implementation risk while the replacement is built, and cutover risk while customers and data move onto it.
Building in stages doesn't remove the cutover risk: a team can build the replacement part by part and still move everyone over at once. A staged replacement spreads both risks, because each part is built and goes live on its own:
Route | Fits when | You pay for |
|---|---|---|
Replace in stages | The system is large, its data is hard to move, or customers can't accept a planned window | 2 systems to run, data to keep in sync, a longer timeline |
One final switchover | The system is small, its data is easy to move, and customers accept a short planned window | Cutover risk concentrated on one day, even after a staged build |
A staged replacement usually follows the strangler fig pattern, which grows a new system around the old one until the old one can be switched off. As Martin Fowler describes it, you build "small additions, often new features, that are built on top of, yet separate to the legacy code base", then move behavior over piece by piece. Fowler notes that this makes "both investment and returns occur gradually and visibly".
DBB took this route with DispatchHealth, an at-home urgent care provider whose Ruby on Rails monolith carried high-traffic, high-complexity features. Instead of rewriting it at once, we designed the long-term migration roadmap and helped decide which features to move out first, based on load, business criticality and monolith bottlenecks.
17 production microservices handle that work to date. The result so far is a lighter load on the monolith and a platform that's easier to maintain.
Our guide on how to modernize a legacy software platform covers the techniques for carrying out either route.
Why Engineers Push for a Rewrite, and How to Say Not Yet
Engineers push for a rewrite because working in old code is slow and frustrating, its rules are often undocumented, and a new design is easier to reason about and to hire for. Those are real costs, and they belong in the evidence: frustration shows up as slower changes, more defects and people leaving.
The question to put back to the team is which business problem a rebuild would remove that a smaller change can't.
To say "not yet" without losing the team, give the engineers who want the rewrite ownership of the evidence. They can:
Gather the measures the decision rests on.
Make the case for a rebuild on those numbers.
Lead a time-boxed first stage, with checkpoints agreed in advance.
If the evidence backs the rebuild, they've earned it. If it doesn't, the team has reached the answer itself.
Set Checkpoints Before the Work Starts
Set checkpoints before the first stage starts: after each stage, re-measure what you decided on, such as running cost, change lead time and incidents, and compare the results with what the stage was meant to change. Agree in advance what each result means. If the first extracted part moved the measures it targeted, continue; if it didn't, stop and check whether a refactor would remove the constraint for less. Deciding this before the work starts keeps a stalled rebuild from running on momentum.
Replacing part of a system your customers rely on?
See how we keep, refactor, replatform or replace live applications in stages, documenting the business logic and protecting existing behavior through testing and controlled changes.
Explore application modernization
Rebuilding or Refactoring a Product Customers Use Every Day
When customers use the product every day, weigh the transition as carefully as the build: in some systems moving over is the larger cost and risk, and in others the build itself is. 4 continuity questions shape the choice:
How long can new features wait? A rebuild that freezes the roadmap until the new system catches up costs more the longer customers wait.
What depends on the old system's behavior? Billing, integrations and reports have to keep working, and you need a way to show the new system matches them.
Can customers accept a short planned window? If the product has to stay available throughout, a single switchover may be off the table.
How long would you run both, and who decides when the old version goes? Running 2 systems costs money for as long as both run.
You can keep shipping features while you modernize when the work runs in steps and the time split is set on purpose. Agree a fixed share of engineering time for the modernization, review it at each checkpoint, and name the person who settles it when product and engineering disagree, ideally whoever owns both budgets.
In a technical discovery for a live healthcare mobile app, DBB's brief was to provide "a phased plan that modernizes a live app without destabilizing it". The plan root-caused the recurring production defects first, and the Software Design Document we delivered turned an all-at-once rewrite into a staged, risk-managed sequence.
Once you've chosen, the cutover needs a plan of its own: how and when customers move, how you'd move back, and what they're told. Plan the transition with the same care as the build, because it's the part your customers will notice first.
How to Build the Business Case for Your Choice
An application modernization business case is a one-page argument that compares every option, keeping included, in money and risk over the same horizon, and ends with the first step you're asking to fund.
Estimate 2 kinds of cost for each option over the same horizon. One-time costs are what the change itself costs, including the transition: migration, testing, running 2 systems and the roadmap slowed while the work runs. Ongoing costs are what each option costs to live with afterwards. The table has no sample numbers on purpose, because costs vary too much between systems for a sample to help. Fill each cell from your own estimates, bills and logs:
Option | One-time cost | Ongoing cost | Main risk |
|---|---|---|---|
Keep and stabilize | Setting up the 6 basics (engineering estimate) | Hosting, support hours, incidents, roadmap held back | Incidents, knowledge leaving |
Refactor | The refactoring and its tests (estimate per module) | Today's running cost, less what the work removes | Behavior changes where tests are thin |
Replatform | Migration, testing, time on both platforms | The new platform's pricing and support | Incompatibilities found late |
Rebuild | The build, data migration, running both systems | The new system's running cost | Hidden business rules, overruns |
The roadmap held back is the part of keeping's cost no invoice shows, so put a value on it with your product lead. The comparison that matters is each option's one-time cost against what it removes from the ongoing cost over your horizon.
Then write the decision record on one page, so it answers what anyone approving the budget will ask:
The problem: the binding constraint in business terms, such as lost sales, a delayed launch or a support deadline, and how you'll know it's gone.
The options considered: all 4, with the reason each one was ruled out.
Cost and risk over the horizon: the cost table, filled in with your own numbers.
What happens meanwhile: the stages or steps, and what the roadmap and customers will see while the work runs.
The checkpoints: what you'll measure after the first step, and which result stops the work.
The ask: funding for the first step only.
If you're the one approving it, a proposal that covers all 6 lines on one page is ready for a decision.
Need real numbers for your business case?
In a Product Discovery Phase, 2 of our tech leads assess your system and write a Software Design Document with the plan, an estimate range and the risks. It starts with a call with our business development manager.
Book a Discovery Phase call
How to Judge a Modernization Assessment
Look for an assessment that shows the evidence behind each recommendation, compares the viable options, including keeping, and gives you a document you can use with another team. A separately priced assessment helps make the decision transparent, but you should still question the provider's assumptions and incentives.
Any firm that also builds software will hope to win the work, ours included. In DBB's Product Discovery Phase, 2 tech leads assess the system and write a Software Design Document you own and can take to another team. We'll tell you plainly which parts you shouldn't rebuild, and our assumptions deserve the same questions as anyone else's. AI supports our scoping, documentation and testing, and senior engineers review everything it produces.
Your Next Step Depends on What Your Evidence Shows
Gather the measures, find the one problem that has to go, and fund the first step only. Where are you now? If you've found that problem and want a second opinion before you write the case, book a Discovery Phase call. If you've already chosen a staged replacement, explore how we modernize live applications. If you're still collecting the 8 measures, see how WM Strategy kept its Magento platform running while modernizing its foundations.
