Advanced

Withdrawing a release

Sometimes a published version has to stop being used: it has a security hole, or it was built wrong. Withdrawing is a deliberate act with a rule about what happens to people already running it, and the rule is the part that decides whether the fix works.

What you will see

Reason and replacement in one line - the two things that make the fix actionable.

About 1 min of reading

Try It

Withdraw one.

1

The mark

print('v2.3.0 withdrawn: CVE-2026-11, use v2.5.1')

Before you run it, say out loud what it will print. Then open the answer.

What it prints
Reason and replacement in one line - the two things that make the fix actionable.

Data Flow

A withdrawal changes selection.
1 Mark the version withdrawn
↓
2 Keep it resolvable by lock
↓
3 New resolutions skip it
↓
4 Announce with a replacement
Line by line

Read the first example one line at a time. A line that prints shows what appears on screen; the rest set things up quietly.

print('v2.3.0 withdrawn: CVE-2026-11, use v2.5.1') Reason and replacement in one line - the two things that make the fix actionable.
Why this works
Announce it where it is used

The withdrawal has to appear in the changelog and in the resolver's message. A withdrawal known only to the person who did it is a fix that reached nobody.

Give the path forward

The message names the version to move to. A person reading 'withdrawn' has to have somewhere to go, and the path is the difference between a warning and an action.

Examples

Newer wins, old stays

A withdrawn version stops being chosen for new installs and stays resolvable for locks that name it. That is what lets an existing build keep working while the bad one is no longer picked.

Say why

The withdrawal carries a reason and the replacement. A withdrawal with no reason is a version that disappears from a search, and the next person cannot tell whether they are affected.

Do not delete

Deleting a published artifact breaks the builds that already reference it and makes the history unreadable. Marking it withdrawn keeps both, and marking is the act.

Words this lesson uses

Each one is defined here on this site. Open the entry for the full definition and the other words it points at.

← Dependency ranges and resolution
Previous Lesson
Dependency ranges and resolution
Next Lesson
Long term support windows
Long term support windows →