Questions We Get Asked About Retiring a Package
Every package eventually reaches the end of its active life. The underlying problem gets solved by the platform, a better alternative appears, or the maintainer moves on. Retiring a library responsibly is one of the most useful things a maintainer can do for its users, yet there is little guidance on it. Here are the questions readers ask, with direct answers.
Should I delete the package from the registry?
Almost never. Deleting a package that others depend on breaks their builds, and on some registries it can free the name for someone else to claim, which is a supply-chain risk. Registries restrict deletion for this reason; the npm unpublish policy, for instance, limits when a package can be removed. The better approach is to leave published versions installable and mark the package as no longer maintained.
How do I mark it as deprecated?
Use the registry's own mechanism so that users see a warning at install time:
# npm: warns on every install of any version
npm deprecate tidy-dates "No longer maintained. Use the built-in Intl APIs instead."
# Go: in go.mod of a final release
// Deprecated: use example.com/newdates instead.
module example.com/tidy-dates
For Python packages, a common approach is a final release whose README and project description state the status clearly, together with the "Development Status :: 7 - Inactive" classifier. PyPI also supports marking a project as archived from its settings. Check the registry documentation for what is currently available.
What should the final README say?
- A clear status line at the very top: unmaintained, archived, or replaced.
- What to use instead, if there is a reasonable alternative.
- Whether security reports will still be read, and for how long.
- Whether forks are welcome, which the licence normally already permits.
Should I archive the repository too?
Archiving on most forges makes the repository read-only while keeping it visible, which is usually what you want: code, history and issues remain available for reference. Before archiving, close or label open issues and pull requests with a short explanation so nobody waits for a reply that will never come.
Someone wants to take it over. Should I hand it on?
Be careful. Handing publish rights to a stranger means every existing user will automatically receive whatever they publish next. Past incidents across ecosystems have shown that ownership transfers can be abused. If you do transfer, prefer someone with a track record in the project, transfer the repository first, watch a few contributions, and only then share registry rights. Alternatively, let a fork live under a new name and point to it from your README; users then opt in deliberately.
A retirement checklist
- Decide and write down the status: archived, replaced or seeking new maintainers.
- Publish a final release with an updated README and deprecation notice.
- Run the registry's deprecate or archive command.
- Triage and close open issues with a pointer to the notice.
- Archive the repository.
- Remove unused publish tokens and CI secrets.
Retiring well is part of a broader deprecation policy; writing that policy early makes the final step much easier.