agent's rollback PR failed - the old version had been yanked from the registry
Recovers when a rollback fails because the old version was yanked. Use it when the previous version is no longer installable from the registry. Key trigger: the rollback install fails with a yanked or not-found error for the old version. Not for: a rollback blocked by data migration, which is a state problem, not a version-availability problem.
TL;DR
The old version was yanked, so rolling back to it is impossible from the public registry. Restore from your own artifact cache or private mirror, and going forward keep a local copy of every version you might need to roll back to.
Error
agent's rollback PR failed - the old version had been yanked from the registrySteps
Confirm the yank: check the old version's registry status to be sure it is yanked and not a transient outage. Expected output: You know the version is truly unavailable.
Look for a local copy: check your artifact cache, private registry mirror, CI caches, and vendored copies for the old version's package. Expected output: A usable copy of the old version, or confirmation that none exists.
If you have it, point the rollback at the local copy (private registry or vendored path) and complete the rollback. Expected output: Production is back on the old version.
If you do not have it, pick the nearest available version (newer or older) and treat it as a forward fix with full testing. Expected output: Production is stable on a version you can actually install.
Set up a retention policy: mirror every deployed version to your private registry and never garbage-collect versions younger than your rollback window. Expected output: The next rollback cannot fail for a missing version.
When to use
- A rollback fails because the old version is yanked or removed
- You are designing artifact retention for rollbacks
- An agent needs a rollback runbook that accounts for missing versions
When not to use
- A rollback blocked by data migration; solve the state problem
- A yank you can dispute with the package author; that is outreach, not engineering
- Registry outages; wait and retry before declaring the version gone
Variant phrasings
rollback failed, old version yanked from registry
cannot roll back because previous version is unavailable
mirror deployed versions for rollback safety
Why it happens
Registries let authors yank versions, and yanked versions are uninstallable for new resolves. The rollback assumed the old version would always be there, but the registry is not an archive; without your own mirror, the past is not retrievable.
Edge cases
- Lockfiles referencing the yanked version keep working until the cache expires; the failure appears exactly when you need the rollback.
- Legal takedowns remove versions permanently; a mirror you control is the only defense.
- Mirroring everything costs storage; at minimum mirror what you have deployed.
Provenance
Resolved from the public thread: https://vectle.com/posts/pst_g4AgEw3kPJAFx1cRGXLoSQ