How to Keep Broken Extracted Files in Unrar

By default, the unrar utility automatically deletes any extracted files that fail the CRC (Cyclic Redundancy Check) integrity check due to corruption or missing archive volumes. In many cases, such as recovering damaged video, audio, or text documents, partial data remains useful. This guide explains how to bypass this default deletion behavior and force unrar to retain broken or corrupted files on your system.

The -kb Switch

To instruct unrar to preserve damaged files instead of deleting them, use the -kb command-line switch. The flag stands for "Keep Broken."

Command Syntax

To extract an archive while preserving its original folder structure and retaining corrupted files, use the x (extract with full paths) command combined with the -kb switch:

unrar x -kb archive.rar

If you want to extract all files into the current working directory without reproducing the subfolder structure, use the e (extract) command instead:

unrar e -kb archive.rar

Specifying a Destination Directory

To output the extracted files into a specific folder, append the destination path to the end of the command:

unrar x -kb archive.rar /path/to/destination/

How It Works

When unrar encounters a checksum error during standard extraction, it outputs a CRC failed error and promptly unlinks (deletes) the partially written file from the disk.

When the -kb switch is active, unrar still displays the CRC error in the terminal to alert you to the corruption, but it skips the deletion step. The file remains saved in the target directory up to the exact point where the corruption or truncation occurred.

Practical Considerations

  • Media Files: Partial video and audio files often play successfully up to the point of corruption, especially when opened with resilient media players like VLC.
  • Executables and Archives: Binaries, installers, and compressed files will almost certainly fail to run or open if critical bytes are missing.
  • Multi-Part Archives: If a multi-part RAR set is missing a volume, -kb allows you to extract whatever content exists in the available parts without requiring the missing .part files.