Discontinuing a Package
Discontinuing a package signals that the maintainer is no longer shipping fixes or new features. Unlike retracting a single version, this applies to the whole package — every version, past and future. club follows the pub.dev convention: discontinued packages remain fully downloadable and resolvable, but dart pub and the club UI surface the status so consumers can plan a migration.
When to Discontinue
- You are no longer maintaining the package and have no plans to resume.
- You’ve superseded it with a new package (use
replacedByto point users there). - The functionality has moved into the Dart/Flutter SDK or another upstream library.
Prefer discontinuation over deleting the package. Deletion breaks every downstream lockfile; discontinuation does not.
What Happens Downstream
- The package page shows a Discontinued banner, with a link to the replacement if
replacedByis set. - The pub API response (
/api/packages/<pkg>) includes"isDiscontinued": trueand the optional"replacedBy": "<package>". dart pub outdatedflags the dependency so users see it at the next upgrade.- The version solver still resolves the package — lockfiles and
dart pub getkeep working. Discontinuation is informational, not enforcement. - If you set
replacedBy, the club web UI and pub CLI surface it as the recommended migration target. The replacement must be a valid package name on the same registry; club doesn’t validate that it actually exists (the pub spec leaves this to the consumer).
Who Can Discontinue
- Any named uploader on the package.
- Any admin of the publisher that owns it.
- A server admin or owner.
Discontinuing a Package
- Open the package page.
- Switch to the Admin tab.
- Toggle Discontinued.
- Optionally enter a Replaced by package name.
- Save.
PUT /api/packages/<pkg>/optionsAuthorization: Bearer <token>Content-Type: application/json
{ "isDiscontinued": true, "replacedBy": "new_package"}Omit a field to leave it unchanged. Set replacedBy to null to clear the replacement hint without un-discontinuing the package.
Updating the Replacement
Set, change, or clear the replacement hint without touching the discontinued status:
PUT /api/packages/<pkg>/options{ "replacedBy": "different_package" }PUT /api/packages/<pkg>/options{ "replacedBy": null }Un-discontinuing
Resuming maintenance? Flip the flag back:
PUT /api/packages/<pkg>/options{ "isDiscontinued": false, "replacedBy": null }The banner disappears immediately and the package returns to normal listing.
Audit Log
Discontinuing, updating replacedBy, or un-discontinuing each append an entry to the package activity log with the actor and full before/after payload:
GET /api/packages/<pkg>/activity-logEvent kind: packageOptionsUpdated.
See Also
- Package Administration overview
- Unlisting a Package
- Retracting a Version — for pulling a single bad release rather than the whole package