How to Decommission Legacy ML Models Safely
Decommissioning a legacy ML model safely requires dependency mapping, a staged rollback plan, and clear communication to affected teams — not just switching the service off. Here's how to do it without breaking what you didn't know was connected.

Decommissioning a legacy ML model safely means mapping every downstream dependency before touching production, running the replacement in shadow mode, shifting traffic gradually while monitoring for divergence, and keeping the retired model's infrastructure warm for an agreed observation window before deleting anything. Skipping any of these steps is how teams end up with broken dashboards, silent fraud-score failures, or a model nobody can roll back to when the replacement underperforms. The rest of this guide walks through each stage in order.
Most organisations plan carefully for the day a model goes live. Few plan with the same rigour for the day it comes down. Legacy models accumulate quietly in production — forecasting services nobody remembers commissioning, recommendation engines bolted onto several generations of front-end, fraud scores that still run even though a newer model took over the decision path months ago. Retiring them safely is an engineering discipline in its own right, not an afterthought to a migration project.
What does it mean to decommission an ML model in production?
Model decommissioning is the structured process of removing a machine learning model from an active production environment — including its serving infrastructure, data pipelines, and downstream dependencies — while preserving the ability to audit, reproduce, or roll back to it if required. It is distinct from simply switching off a service. A model rarely sits in isolation. It feeds dashboards, triggers business rules, and often has silent consumers that nobody documented when the model was first deployed.
Why do legacy ML models get stuck in production longer than they should?
Legacy models persist because nobody owns the decision to remove them. Ownership of a model typically transfers from the team that built it to whoever maintains the platform, and that handover rarely includes a deprecation plan. The result is models running years past their useful life, consuming compute, and quietly drifting away from the data distribution they were trained on.
This is compounded by a lack of dependency visibility. A model built for one purpose often gets reused — a churn score repurposed as an input to a pricing model, for example — and these secondary dependencies are rarely captured in architecture diagrams. Removing the original model then breaks something nobody connected to it in the first place. This is one of the reasons model retirement needs the same architectural scrutiny as application modernisation work on legacy software systems — the failure modes are similar, even though the artefact is a model rather than a monolith. It is also why decommissioning planning belongs inside ai product strategy from the outset, rather than being bolted on once a model is already overdue for retirement.
How do you map dependencies before retiring a model?
Dependency mapping means tracing every system, pipeline, dashboard, and downstream model that consumes the output of the model you intend to retire, before you touch production. Start from the model's prediction endpoint or scoring table and work outward: which services call it directly, which batch jobs read its output, and which reports or alerts are built on top of those outputs.
In practice this requires combing through orchestration logs, API gateway records, and data warehouse lineage rather than relying on documentation, because documentation is almost always out of date. Where an organisation has invested in proper data infrastructure with lineage tracking built in, this step is materially faster — teams can trace consumption programmatically rather than interviewing every team that might plausibly be affected. Where that infrastructure doesn't exist, treat the dependency audit itself as a prerequisite project, not a quick checklist item.
What does a staged rollback plan look like?
A staged rollback plan is a sequence of reversible steps — traffic reduction, shadow running, and a defined fallback — that lets a team retire a model gradually while retaining the ability to restore it quickly if something breaks downstream. The opposite of a staged plan is a hard cutover, where the old model is switched off and the new one takes over in a single step. Hard cutovers are faster to execute but leave no room to catch problems before they reach customers or downstream systems.
A sensible staged approach typically includes running the new model in shadow mode alongside the old one — scoring the same inputs without acting on the output — then progressively shifting a small percentage of live traffic to the new model while monitoring for divergence, and keeping the legacy model's serving infrastructure warm, not deleted, for an agreed period after full cutover. Only once that observation window closes without incident should the legacy model's infrastructure, credentials, and storage be fully decommissioned. Teams building this discipline into their standard practice, rather than treating each retirement as a one-off, are effectively doing ai engineering — the operational work that sits alongside model development and makes production ML sustainable rather than fragile.
How should you communicate a model sunset to affected teams?
Communicating a model sunset means giving every team with a dependency on the model — identified during dependency mapping — advance notice, a clear timeline, and a named point of contact before any change is made. This is a stakeholder management problem as much as a technical one. Teams that consume a model's output in a dashboard or a downstream rule engine need time to validate that the replacement produces compatible results, and they need to know who to call if something looks wrong after cutover.
A simple cadence works well: an initial notice when the decommission is scheduled, a reminder as the staged rollback begins, and a final confirmation once the legacy model's infrastructure is fully removed. Each message should state what is changing, when, and what action, if any, the receiving team needs to take. Silence is the most common failure mode here — not malice, just the assumption that someone else will mention it.
How long should you retain data and audit records after retirement?
Retention periods should be set by your regulatory obligations first and operational convenience second. Organisations in regulated sectors such as financial services or healthtech typically need to retain model inputs, outputs, and version metadata for a period set by their regulator or auditor, rather than an internally chosen default — the relevant retention period varies by industry and jurisdiction, so this is a question for your compliance function, not a default engineering setting. Beyond the regulatory minimum, it's good practice to retain enough of the model artefact, training data snapshot, and scoring logs to reconstruct a decision if a customer dispute or audit arises later, even after the serving infrastructure itself has been torn down.
Decommissioning is rarely glamorous work, but organisations that treat it as a planned, staged process rather than an emergency cleanup spend far less time firefighting broken dependencies months later. If your organisation is carrying models you're not confident you could safely retire today, that's usually a sign the underlying data infrastructure and ownership model need attention before the next one ships. For more on building that foundation, see more insights from our team, or get in touch to talk through your specific environment.
Chris Kerr
Partner at Horizon Labs, an AI product consultancy and venture studio. A commercially focused product and technology leader with 20+ years building and scaling digital platforms, teams, and businesses across SaaS, travel, eCommerce, logistics and transport, and digital marketing — operating at the intersection of product, engineering, and data. Writes about platform strategy, AI transformation, modern data ecosystems, and the operational discipline that separates AI demos from AI products.


