How to update a command-line program using Homebrew?

curl is a command line tool for transferring data with URLs. It is installed on my system as version 7.51.0. According to the tool's homepage, its current version number is 7.54.0. I'd like to update my copy of this tool to the latest version.

According to the Releases and Downloads page of curl's website, the latest version can be installed on Mac OS X using Homebrew.

How can I use Homebrew to update my copy of curl to the latest version? Is updating the same as installing? If so, then the answer to my question is:

> brew install curl

But is there a different way to update an already existing program?


Simply no. Only Apple can update programs in /usr/bin etc.

However you can make your scripts find the program from Homebrew first. You do this by making your $PATH have /usr/local/bin (which is where Homebrew puts links to the executables) earlier in the $PATH than OS supplied programs.