> For the complete documentation index, see [llms.txt](https://ploegert.gitbook.io/til/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://ploegert.gitbook.io/til/os/unix/package-management/switch-versions-of-a-brew-formula.md).

# Switch Versions of a Brew Formula

If you've installed a couple versions of a program via brew and you'd like to switch from the currently linked version to the other installed version, you can use the `switch` command. For instance, if you are on version `1.8.2` of `phantomjs` and you'd like to switch to `1.9.0`, you can simply invoke:

```
$ brew switch phantomjs 1.9.0
```

More generically:

```
$ brew switch <formula> <version>
```
