Skip to main content
Last updated: 10 Nov 2026

Retire a gem

Also check the general guidance on retiring repos.

1. Ensure the gem is not used by any apps

Search for dependents of the gem in our codebases.

Example

For any repos which are found to have the gem as a dependency, you should confirm that the gem is actually being used and that it’s not simply a leftover artefact that is no longer in use. Check the usage instructions in the gem’s README and then search for the corresponding code in the repo (e.g. use Rack::Logstasher::Logger). Alternatively, find the commits where the gem was added and used, and see if the corresponding code that uses the gem still exists.

If the gem is being used you will either need to replace it with a different gem or your own code before you can archive it.

If removing the gem from an app, take the usual measures of due diligence (e.g. ensuring tests pass, monitoring the release for Sentry errors, etc).

2. Update gem’s README

When the gem’s repo is ready to be archived, push a commit explaining the reasons for archiving it.

Example

3. Archive the repo

Before you proceed with archiving the repo, ensure that all workflow runs listed under “Actions” have completed or cancel them.

Follow the ‘Archiving repositories’ instructions in the govuk-infrastructure.

4. Remove references and update docs

Remove the repo’s entry from govuk-developer-docs.

Search for any other references to the gem in our codebases and update or remove them.

Example

5. Yank the gem (optional)

Once the gem has been archived you may want to yank it from Rubygems if it was published there. The Rubygems login credentials are under 2ndline/rubygems in Secrets Manager.

You should only really do this if the gem was published in error or contains a security vulnerability. If it’s simply that the gem is no longer maintained, it’s fine to leave it published.