What is wget?

Wget retrieves files from web and other supported URLs, making repeatable downloads convenient in shell scripts.

Homebrew installs wget as a formula: a package definition for command-line software and its dependencies. If Homebrew is not installed yet, follow the official installation guide before continuing.

Install and check the formula

Refresh Homebrew’s package definitions, then install wget. Use brew info to inspect the current package and its dependencies; the actual installed version can change over time.

brew update
brew install wget
brew info wget

Try it

The -O option saves the response to a named file. Replace the example URL with a source you trust.

wget --version
wget -O example.html https://example.com/

Before you rely on it

Check a download’s origin and checksum before running an executable. A successful download does not establish that a file is safe.

curl is a flexible alternative, especially when inspecting headers or sending API requests.

Update or remove it

Run brew outdated to see if a newer version is available, and brew upgrade wget to upgrade this formula. Before removing it, preview the changes; other packages may depend on it.

brew outdated
brew upgrade wget
brew uninstall --dry-run wget

Sources and further reading