---
title: "Homebrew curl: (28) timeout on Mac: fix failed downloads · Kilobat Guides"
url: "https://kilobat.app/guides/homebrew-curl-28-timed-out.html"
description: "brew install or brew update stops with curl: (28) on your Mac. Find why the download timed out and set retries, a proxy or a mirror."
---

Error messages

# Homebrew fails with “curl: (28)” on Mac

Homebrew downloads with curl. curl exit code 28 is a timeout. The curl documentation says: “The specified time-out period was reached.”

Applies to: Current Homebrew on all current macOS versions. · Checked: 29 October 2026

## Symptoms

- `brew install` stops with `curl: (28)`, then a message that the time ran out.
- Homebrew says that it failed to download a resource.
- Downloads fail on a slow network, a VPN or a company network.

## Likely causes

- **A slow or lossy connection.** Large bottles time out on a weak Wi-Fi or a hotspot.
- **A proxy that curl does not use.** Homebrew uses `http_proxy`, `https_proxy` and `all_proxy`.
- **A firewall that drops traffic.** A network that drops connections to the download host causes a timeout.
- **A broken IPv6 path.** The download host has an IPv6 address, and IPv6 does not work.

## How to check

1. Let Homebrew check your system.

   ```
   brew doctor
   ```
2. Test the download host with curl, IPv4 only.

   ```
   curl -4 -I https://ghcr.io/v2/
   ```
3. Show the proxy variables.

   ```
   env | grep -i proxy
   ```
4. Measure the connection.

   ```
   networkQuality
   ```

## How to fix it

1. Let Homebrew try more times. The default is 3 retries.

   ```
   export HOMEBREW_CURL_RETRIES=5
   ```
2. If the network needs a proxy, set it in the same shell.

   ```
   export https_proxy=http://proxy.example.com:8080
   ```
3. If your company has a mirror, set `HOMEBREW_BOTTLE_DOMAIN` and `HOMEBREW_API_DOMAIN`.
4. Run the command again on a faster network, if you can.

## With Kilobat

1. Check if the network is metered, on a VPN or slow.

   ```
   kilobat conditions
   ```
2. Kilobat's connection doctor tests the host layer by layer: network, proxy, DNS, rules, IPv4, IPv6, TLS and the server. It names the layer that failed.

   ```
   kilobat why https://ghcr.io/v2/
   ```
3. Keep the Mac awake while the install runs.

   ```
   kilobat awake -- brew upgrade
   ```
4. These Kilobat checks are free. AI agents run them through MCP with `diagnose_connection` and `diagnose_network`. See [Find why one site or API won't connect](https://kilobat.app/guides/recipes/why-cant-it-connect.html).

## Questions

**What is curl error 28?**

It is `CURLE_OPERATION_TIMEDOUT`. The curl man page lists exit code 28 as an operation timeout.

## Sources

- [curl: libcurl error codes](https://curl.se/libcurl/c/libcurl-errors.html)
- curl(1), EXIT CODES, man page installed with macOS 27.2
- [Homebrew Docs: Manpage, environment variables](https://docs.brew.sh/Manpage)
- brew(1), HOMEBREW_CURL_RETRIES, man page installed with Homebrew

Sources checked on 29 October 2026. Man pages are the ones installed with macOS; open one with `man <name>` in Terminal.

## Related guides

- [Homebrew or npm downloads fail on a Mac](https://kilobat.app/guides/homebrew-npm-download-fails.html): Homebrew downloads with curl and Git.
- [“curl: (6) Could not resolve host” on Mac](https://kilobat.app/guides/curl-could-not-resolve-host.html): curl exit code 6 means that curl could not get an address for the host name.
- [Check the network before a big download in an agent](https://kilobat.app/guides/recipes/check-network-before-download.html): An agent can ask Kilobat if now is a good time for a large transfer.
- [Proxy settings stop apps from connecting on a Mac](https://kilobat.app/guides/proxy-settings-breaking-apps.html): A proxy setting sends traffic through another server.
