The preferred and supported method of installing specific versions of formulae is to use the [Homebrew-versions](https://github.com/Homebrew/homebrew-versions) tap.
## Installing previous versions of formulae
The preferred and supported method of installing specific versions of
Sometimes it's faster to download a file via means other than those strategies that are available as part of Homebrew. For example, Erlang provides a Torrent that'll let you download at 4–5× the normal HTTP method. Download the file and drop it in `~/Library/Caches/Homebrew`, but watch the file name. Homebrew downloads files as <code>{{ formula name }}-{{ version }}</code>. In the case of Erlang, this requires renaming the file from <code>otp_src_R13B03</code> to <code>erlang-R13B03</code>.
**New:**
```bash
mv the_tarball `brew --cache formula-name`
```
Sometimes it's faster to download a file via means other than those
strategies that are available as part of Homebrew. For example,
Erlang provides a torrent that'll let you download at 4–5× the normal
HTTP method.
You can also pre-cache the download by using the command `brew fetch formula` which also displays the SHA1 and SHA256 values. This can be useful for updating formulae to new versions.
Download the file and drop it in `~/Library/Caches/Homebrew`, but
watch the file name. Homebrew downloads files as <code>{{ formula
name }}-{{ version }}</code>. In the case of Erlang, this requires
renaming the file from <code>otp_src_R13B03</code> to
<code>erlang-R13B03</code>.
`brew –-cache -s erlang` will print the correct name of the cached
download. This means instead of manually renaming a formula, you can
run `mv the_tarball $(brew --cache -s $FORMULA)`.
You can also pre-cache the download by using the command `brew fetch formula` which also displays the SHA1 and SHA256 values. This can be useful for updating formulae to new versions.
## Using Homebrew behind a proxy
Behind the scenes, Homebrew uses several commands for downloading files (e.g. curl, git, svn). Many of these tools can download via a proxy. It's a common (though not universal) convention for these command-line tools to observe getting the proxy parameters from environment variables (e.g. `http_proxy`). Unfortunately, most tools are inconsistent in their use of these environment parameters (e.g. curl supports `http_proxy`, `HTTPS_PROXY`, `FTP_PROXY`, `GOPHER_PROXY`, `ALL_PROXY`, `NO_PROXY`).
Luckily, for the majority of cases setting `http_proxy` is enough. You can set this environment variable in several ways (search on the internet for details), but the way I prefer is:
Luckily, for the majority of cases setting `http_proxy` is enough.
You can set this environment variable in several ways (search on the
**NB:** this technique will also work if you prefer to use `sudo` with Homebrew. But as `sudo` clears the environment before executing Homebrew, your proxy settings may get lost.