Files & Folders
Repair a corrupted .zip or .rar archive
Most 'corrupt archive' cases are truncation: the compressed entries are fine but the directory at the end of the file is missing. Tools can rebuild the directory or scan forward through the entries.
Stop doing this first
- Do not overwrite the archive in place with a repair tool.
- Do not re-download over the same filename if the partial file is your only copy.
The safe order of operations
- 1
Work on a copy and compare the file size to the expected size — a short file means a failed transfer.
- 2
Try zip -FF to rebuild the central directory into a new archive.
- 3
For RAR, use the repair command; recovery records make this far more likely to succeed.
- 4
If the container is unrecoverable, carve individual files out of the raw bytes instead.
Commands that do the work
Check integrity
unzip -t broken.zipRebuild the archive
zip -FF broken.zip --out repaired.zipRepair a RAR
unrar r broken.rarCarve files from raw bytes
photorec broken.zipRealistic odds
Partially recoverable in most truncation cases; early-header damage can still yield later files.
Your case will differ in the details. Load this scenario into the recovery form and add what you already tried — you'll get a plan for your exact situation.
Get my recovery plan