---
source: https://iinventedlight.com/library/notes/curl-retry.md
title: "curl --retry repeats a transfer after certain transient errors"
license: CC-BY-4.0
license_url: https://creativecommons.org/licenses/by/4.0/
source_license: "CC-BY-4.0 (Everything curl); curl license (MIT-derived) (curl/curl (GitHub)); prose restates cited source lines in own words"
license_family: mixed-green
attribution: "Summary by iinventedlight (AI-assisted). Sources: Everything curl, Retry; curl/curl (GitHub), --retry. CC-BY-4.0 (https://raw.githubusercontent.com/curl/everything-curl/master/LICENSE). Copyright the everything curl authors. curl license (MIT-derived) (https://raw.githubusercontent.com/curl/curl/master/COPYING). Copyright (c) 1996 - 2026, Daniel Stenberg, and many contributors."
author: "iinventedlight (synthesis of cited sources); text drafted with AI assistance"
date: 2026-11-23
status: published
approved_by: "Cole Withington, 2026-11-27 14:30 PT: \"Yes, publish all of that now\""
checked_on: 2026-11-23
as_of: 2026-11-23
confidence: medium
untested: "Not reproduced (2026-11-23). Official docs and source files were read; no test suite, server, or API call was run for this note."
category: coding-references
topic_area: "code-cli: curl retry"
tags: [curl, retry, http, transient-errors]
client: Librarian
sources:
  - id: S1
    title: "Retry"
    publisher: Everything curl
    url: https://everything.curl.dev/usingcurl/downloads/retry.html
    accessed: 2026-11-23
    license: "CC-BY-4.0"
  - id: S2
    title: "--retry"
    publisher: curl/curl (GitHub)
    url: https://github.com/curl/curl/blob/master/docs/cmdline-opts/retry.md
    accessed: 2026-11-23
    license: "curl license (MIT-derived)"
---
# curl --retry repeats a transfer after certain transient errors
**Answer:** The --retry option tells curl to retry certain failed transfers. By default curl does no retries. A transient error includes a timeout, an FTP 4xx response, or HTTP 408, 429, 500, 502, 503, 504, 522, or 524. --retry-max-time caps the total time allowed for retries. --retry-all-errors makes curl treat all transfer failures as a reason to retry.

## Notes

The man page help text is "Retry request if transient problems occur". When curl is about to retry a transfer, it first waits before the next attempt.

## See also

- [curl-follow-redirects](https://iinventedlight.com/library/notes/curl-follow-redirects/)
- [curl-save-output](https://iinventedlight.com/library/notes/curl-save-output/)
- [curl-request-method](https://iinventedlight.com/library/notes/curl-request-method/)

## Claims

- id: C1
  claim: --retry tells curl to retry certain failed transfers.
  source: S1
  evidence: "Using the --retry option you can tell curl to retry certain failed transfers."

- id: C2
  claim: --retry-max-time caps the total time allowed for retries.
  source: S1
  evidence: "With --retry-max-time you cap the total time allowed for retries."

- id: C3
  claim: The default is to do no retries.
  source: S2
  evidence: "makes curl do no retries (which is the default)"

- id: C4
  claim: A transient error includes a timeout or an FTP 4xx response.
  source: S2
  evidence: "Transient error means either: a timeout,"

## Sources

- [S1] Retry. Everything curl. https://everything.curl.dev/usingcurl/downloads/retry.html . License: CC-BY-4.0. Accessed 2026-11-23.

- [S2] --retry. curl/curl (GitHub). https://github.com/curl/curl/blob/master/docs/cmdline-opts/retry.md . License: curl license (MIT-derived). Accessed 2026-11-23.

License: this note is CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Summary by iinventedlight (AI-assisted). Sources: Everything curl, Retry; curl/curl (GitHub), --retry. CC-BY-4.0 (https://raw.githubusercontent.com/curl/everything-curl/master/LICENSE). Copyright the everything curl authors. curl license (MIT-derived) (https://raw.githubusercontent.com/curl/curl/master/COPYING). Copyright (c) 1996 - 2026, Daniel Stenberg, and many contributors. Text was condensed and changed from the originals.

---

Agents: [/agents.md](/agents.md) | [/.well-known/agent-library.json](/.well-known/agent-library.json).
