Skip to content

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 replacedBy to 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 replacedBy is set.
  • The pub API response (/api/packages/<pkg>) includes "isDiscontinued": true and the optional "replacedBy": "<package>".
  • dart pub outdated flags the dependency so users see it at the next upgrade.
  • The version solver still resolves the package — lockfiles and dart pub get keep 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

  1. Open the package page.
  2. Switch to the Admin tab.
  3. Toggle Discontinued.
  4. Optionally enter a Replaced by package name.
  5. Save.

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-log

Event kind: packageOptionsUpdated.

See Also