What is an .aria2 file?
Architecture, resuming & recovery
A .aria2 file sits next to every unfinished aria2 download. It is the download's memory: which pieces are already on disk. Keep it, and aria2 resumes exactly where it stopped. Lose it, and the result can be a file that looks complete but is not.
The short answer
- file.iso.aria2 is aria2's control file for file.iso. It records which pieces of the file are finished; it does not contain any of the file's data.
- aria2 writes it while downloading and deletes it by itself when the download completes.
- To resume, run the same download again into the same folder. aria2 finds the control file and continues.
- It holds no URL. To resume you need the link (or aria2's session file) as well.
Can I delete it?
| Situation | What to do |
|---|---|
| The download finished | Nothing: aria2 has already removed it. If one is left, the download did not finish. |
| The download is paused or was interrupted | Keep it together with the partial file. Delete it only if you will never resume. |
| You gave up on the download | Delete both the .aria2 file and the partial file. |
| You want to move the download | Move both files together; aria2 resumes in the new folder. |
.aria2 file inspector
Drop a .aria2 file here to see how far the download got, piece by piece. It is read in your browser and never uploaded. Below is a real control file from a 50 MB download we interrupted after 4 seconds.
- Type
- HTTP/FTP download
- Total size
- 47.7 MiB
- Completed
- 18.7 MiB
- Pieces
- 16 / 48
- Piece size
- 1 MiB
- In progress
- 4
- Uploaded
- 0 B
- Format version
- 1
finishedpartly downloadednot started
Pieces being downloaded when aria2 stopped
- Piece 457 of 64 chunks of 16 KiB
- Piece 1638 of 64 chunks of 16 KiB
- Piece 2839 of 64 chunks of 16 KiB
- Piece 4038 of 64 chunks of 16 KiB
How resuming works
The example above shows the mechanism at a glance.
- 01
The file is cut into pieces
For HTTP and FTP a piece is 1 MiB by default (piece-length). The 50 MB example has 48 pieces. The control file holds one bit per piece: done or not.
- 02
Each connection takes its own region
With 4 connections aria2 started at four points of the file: pieces 0, 12, 24 and 36. That is why the map shows four finished runs with gaps between them, not one bar from the start.
- 03
Unfinished pieces are tracked in 16 KiB chunks
The four pieces in progress when we stopped aria2 had 38 to 57 of their 64 chunks. On resume aria2 keeps those chunks and fetches only the rest.
- 04
Saved regularly, not continuously
aria2 rewrites the control file every 60 seconds (auto-save-interval) and when it stops normally. After a crash you lose at most the progress since the last save, never the file itself.
What happens when things go wrong: we tested it
We interrupted a 50 MB download of random data (4 connections) and tried each situation. "Intact" means the SHA-256 of the result matched the original.
| Situation | What aria2 did | Result |
|---|---|---|
Interrupted (Ctrl+C), then the same command againaria2c URL |
Resumed from the control file and finished. | Intact |
aria2 killed hard (kill -9) after 3 secondsaria2c URL |
The control file still showed 0 pieces, because the last save was at the start. aria2 downloaded again from the beginning. | Progress lost |
Same, with --auto-save-interval=1aria2c --auto-save-interval=1 URL |
The control file had 12 pieces; aria2 resumed from them. | Intact |
Control file deleted, run again without -caria2c URL |
"File already exists. Renamed to …big.1.bin." Downloaded a second copy from zero. | Progress lost |
Control file deleted, run again with -c (space was pre-allocated)aria2c -c URL |
"Download has already completed." The file has the full size but 25.6 MB of it is zeros. | Corrupted |
Control file deleted, run again with -c (no pre-allocation, 4 connections)aria2c -c URL |
Continued from the end of the file and reported success. 19.5 MB of zeros remained in the gaps. | Corrupted |
Control file deleted, -c, download had used 1 connectionaria2c -c URL |
Continued from the end of the partial file. | Intact |
Partial file deleted, control file keptaria2c URL |
"Removed the defunct control file … because the download file … doesn't exist." Started again. | Progress lost |
The link changed (e.g. an expired signed URL)aria2c -o big.bin NEW-URL |
With the same output name, aria2 used the control file and resumed. | Intact |
Both files moved to another folderaria2c -d NEW-FOLDER URL |
Resumed in the new folder. | Intact |
A corrupted file, repaired with a checksumaria2c -V -c --checksum=sha-256=HASH URL |
"Checksum error detected", then downloaded again and "Verification finished successfully." | Intact |
The lesson: -c (continue) assumes the file was written from start to end, which is only true for single-connection downloads. Never delete the .aria2 file of a multi-connection download and then use -c: aria2 cannot tell which parts are missing and will not warn you.
Recovery playbook
Find your situation; each step was tested above unless marked otherwise.
-
01
The download was interrupted
Run the same command, in the same folder. If you used the RPC server with a session file, just start aria2 again; the session restores the download.
aria2c -d /same/folder "URL" -
02
The link has expired
Get a fresh link and keep the same file name with -o, so aria2 finds the control file.
aria2c -d /same/folder -o file.iso "NEW-URL" -
03
You moved the files
Move file.iso and file.iso.aria2 together and point -d at the new folder.
aria2c -d /new/folder "URL" -
04
You suspect a corrupted file
If you know the file's checksum, let aria2 verify it and fetch whatever is wrong. Without a checksum aria2 cannot detect damage in an HTTP download: download it again.
aria2c -V -c --checksum=sha-256=HASH "URL" -
05
BitTorrent and magnet links
Torrents carry a hash for every piece, so aria2 can check what is on disk with -V even without the control file. (From the manual; not part of our test.)
aria2c -V file.torrent -
06
In a GUI (AriaNg, Motrix and others)
Resume the task from the app's list instead of adding the link again, and do not clear the task. The GUI talks to the same aria2, so the same rules apply. (Not tested in each GUI.)
Inside the file: the binary layout
From aria2's technical notes. Since version 1 all numbers are big-endian. Our inspector reads exactly these fields.
| Field | Bytes | Meaning |
|---|---|---|
VER | 2 | Format version: 1 today (0 was the old host-byte-order format) |
EXT | 4 | Extension flags; the lowest bit asks aria2 to check the info hash |
INFO HASH LENGTH | 4 | 0 for HTTP/FTP, 20 for BitTorrent |
INFO HASH | variable | The torrent's info hash |
PIECE LENGTH | 4 | Size of one piece |
TOTAL LENGTH | 8 | Size of the whole download |
UPLOAD LENGTH | 8 | Bytes uploaded (BitTorrent) |
BITFIELD LENGTH + BITFIELD | 4 + variable | One bit per piece, first piece in the highest bit |
NUM IN-FLIGHT PIECE | 4 | Pieces that are partly downloaded |
INDEX, LENGTH, PIECE BITFIELD | repeated | For each such piece: its number, size and one bit per 16 KiB chunk |
Troubleshooting
"File already exists. Renamed to …file.1.iso"
aria2 found the file but no control file, so it cannot resume safely and starts a second copy. If you still have the .aria2 file, put it back next to the original. Otherwise delete the partial file and download again; do not use -c unless the first download used one connection.
"Download has already completed", but the file does not work
This is the trap from our tests: the control file was gone, -c was used, and the pre-allocated file already had the full size. Check it against the publisher's checksum, or repair it with -V -c --checksum=sha-256=HASH.
"Removed the defunct control file"
The partial file was deleted or moved without its .aria2 file. aria2 removes the orphaned control file and starts again. Move both files together next time.
A .aria2 file is left after the download finished
aria2 removes the control file only when a download completes. A leftover file means the download stopped with an error or aria2 was closed before the end. Start it again to finish, or delete both files.
The download starts from zero after a crash
The control file is saved every 60 seconds by default. Lower auto-save-interval (for example to 10, which yt-dlp uses) if you often lose power.
FAQ
How do I open a .aria2 file?
You do not open it; aria2 does. It is a small binary file with progress information only. To see what is inside, use the inspector above.
Does the .aria2 file contain the download link?
No. It stores only sizes and which pieces are done. Keep the link, or use aria2's session file (save-session), which does store links and options.
Can another download manager continue an aria2 download?
Not with its progress: the .aria2 format is specific to aria2. Another program would have to start over.
Is the .aria2 file the same as a .part or .crdownload file?
No. Those are the partial downloads themselves. aria2 writes data straight into the final file name and keeps the progress separately in the .aria2 file.