How Companies Upgrade Dependencies Across Thousands of Repositories

Keeping dependencies up to date is straightforward in a small project. A developer bumps a version number, runs tests, and merges a pull request. In organizations operating hundreds or thousands of repositories, the process becomes far more complex.
Large engineering teams maintain a broad ecosystem of services, libraries, and internal tools. A single upgrade can affect dozens or hundreds of repositories at once. When these upgrades require API changes or code edits, coordinating them manually becomes slow and error-prone.
Over time, this creates stale dependencies, inconsistent implementation patterns, and large scale code migrations that take months to complete.
To solve this, many companies now treat dependency upgrades as an engineering systems problem and invest in automated dependency upgrades.
The Problem with Dependency Upgrades at Scale
As organizations grow, repository count grows with them. Every repository has its own dependency graph, build settings, and release cadence.
Even seemingly small updates can require refactoring across repositories. Common examples include upgrading a core framework, moving to a new runtime version, replacing deprecated APIs, and applying urgent security patches.
Spotify engineers have written about the challenge of managing changes across a very large software fleet and the need for shared operational approaches rather than purely team-by-team maintenance (fleet-first mindset, part 1).
Instead of treating every repository as a separate maintenance project, they describe operating the codebase as a fleet.
Fleet-Wide Code Changes as a Platform Capability
Fleet-wide maintenance reframes upgrades as platform work. The core idea is simple: define a change once, then apply it safely across many repositories.
In a fleet-first model, migration tooling can scan repositories, identify affected code, and apply standard transformations automatically. This pattern is especially useful for dependency upgrades that include predictable mechanical edits.
Spotify’s engineering posts on fleet management describe this approach in depth, including how they execute fleet-wide refactoring workflows over many repositories (fleet-wide refactoring, part 3).
The result is less repetitive manual work for feature teams and more consistent adoption of standards.
Why Codemods Matter for Large Migrations
Codemods are a key primitive for automated maintenance. A codemod is a source-to-source transformation that updates code based on syntax structure rather than brittle text matching.
That structural understanding makes codemods effective for large scale code migrations where safety and repeatability matter. For example, codemods can update import paths, rewrite deprecated function calls, migrate configuration formats, and normalize usage patterns that changed between dependency versions.
Because the transformation is expressed as code, teams can test and iterate on it before rollout. Once validated, the same codemod can run across a large repository fleet with predictable behavior.
From Codemod to Automated Pull Request Workflow
Writing a codemod handles transformation logic, but rollout still needs execution infrastructure. At scale, companies pair codemods with automated pull request generation.
A typical workflow discovers repositories that match criteria, runs codemods in each target repository, executes tests, and opens pull requests with consistent metadata. Engineers then review generated diffs instead of manually implementing the same migration many times.
This workflow is what makes automated dependency upgrades practical across many teams and services. It also creates a clearer audit trail for migrations and improves throughput for refactoring across repositories.
Designing Safe Upgrade Programs
Automated migrations still need engineering rigor. Successful teams usually run pilot migrations first, measure failure modes, and add safeguards such as idempotent transforms, dry-run previews, and strict CI gates.
They also communicate migration intent early so repository owners understand why pull requests are arriving and what validation is expected. These operational details often determine whether a migration finishes in days or stalls for quarters.
When these practices are in place, codemods and automation become a repeatable system for ongoing maintenance rather than one-off scripts.
Practical Next Steps
If your organization is planning large dependency upgrades, start by identifying recurring migration patterns and implementing codemods for the highest-impact cases. Then connect those codemods to automation that can run changes and open pull requests across repositories.
For reference implementations and examples, see Hypermod Explore. For implementation details on authoring and running codemods, see the Hypermod documentation.
As repository fleets continue to grow, engineering teams that invest in automated dependency upgrades and disciplined migration workflows will have a significant advantage in keeping systems secure, current, and consistent.