Resume a download with curl or wget (curl -C -, wget -c)

The download died at 87%. You do not have to start again: curl and wget can ask the server for just the missing bytes.

curl

# Resume into the same file name as the URL
curl -L -C - -O https://example.com/big.iso

# Resume into a file you named
curl -L -C - -o ubuntu.iso https://example.com/big.iso

# Keep retrying on a flaky connection, resuming each time
curl -L -C - --retry 10 --retry-delay 5 -O https://example.com/big.iso

wget

wget -c https://example.com/big.iso

# keep trying through drop-outs
wget -c --tries=0 --retry-connrefused --waitretry=5 https://example.com/big.iso

--tries=0 means retry without limit. wget already resumes on its own within a single run when the connection drops; -c is what lets a new run pick up an old partial file.

When resuming is refused

MessageMeaningWhat to do
curl: (33) HTTP server doesn't seem to support byte ranges. Cannot resume.The server ignored Range and sent a full 200Nothing to resume against; download again from zero, or find a mirror that supports ranges
The server does not support continued downloads, which conflicts with '-c'. (wget)Same thing; wget refuses to overwrite your partial fileMove or delete the partial file and download again
HTTP 416Your partial file is already as big as (or bigger than) the remote oneCompare sizes; the file may already be complete, or the remote file changed
Resumes, but the checksum is wrongThe remote file changed between attempts, or a proxy served something differentDelete and download fresh; prefer URLs with a version in the name

Signed, expiring links (common for cloud storage) can also break resume: the link from yesterday is dead today. Get a fresh link for the same file and resume with it, as long as the file itself has not changed.

Windows

Always check the result

sha256sum big.iso                       # Linux
shasum -a 256 big.iso                   # macOS
Get-FileHash big.iso -Algorithm SHA256  # PowerShell

Compare with the checksum the site publishes. A resumed file that was stitched from two different versions looks fine until you open it.

Related

Download won't resume / starts over · HTTP 206 Partial Content · 416 Range Not Satisfiable · Accept-Ranges header · ECONNRESET · Wirebook: how resuming works

Questions

How do I resume a download with curl?

Run the same command again with -C - added, for example curl -L -C - -O URL. curl checks the size of the partial file and asks the server for the rest.

How do I resume a download with wget?

Use wget -c URL in the folder that holds the partial file. wget asks for the missing bytes and appends them.

What does curl error 33 mean?

HTTP server doesn't seem to support byte ranges: the server ignored the Range request and sent the whole file, so curl cannot continue the partial one.

Why does my resumed download fail the checksum?

The remote file probably changed between attempts, or a cache served a different copy. Delete the partial file and download it fresh.

Can PowerShell resume a download?

Use curl.exe -C - (built into Windows 10 and 11) or Start-BitsTransfer. Invoke-WebRequest in Windows PowerShell 5.1 cannot resume.

Published .

Try it

Related guides

Newest guides