Renaming a Formula or Cask
Renaming a Formula
Sometimes software and formulae need to be renamed. To rename a formula you need to:
-
Rename the formula file and its class to a new formula name. The new name must meet all the usual rules of formula naming. Fix any test failures that may occur due to the stricter requirements for new formulae compared to existing formulae (e.g.
brew audit --strictmust pass for that formula). -
Create a pull request on the corresponding tap deleting the old formula file, adding the new formula file, and adding it to
formula_renames.jsonwith a commit message likenewack: renamed from ack. Use the canonical name (e.g.ackinstead ofuser/repo/ack).
A formula_renames.json example for a formula rename:
{
"ack": "newack"
}
Renaming a Cask
To rename a cask, follow a similar process:
- Rename the cask file and update the cask stanza to use the new cask token. The new token must meet all the usual rules of cask naming.
- Create a pull request on the corresponding tap deleting the old cask file, adding the new cask file, and adding it to
cask_renames.jsonwith a commit message likenew-token: renamed from old-token.
A cask_renames.json example:
{
"old-token": "new-token"
}