What Happens When Unrar Runs Out of Disk Space?
When the unrar utility runs out of storage space midway
through extracting an archive, the process immediately halts with a
write error, leaving behind a partially extracted set of files. This
article details the exact behavior of unrar during a disk
full failure, the condition of both the extracted files and the source
archive, and how to cleanly resolve the problem.
Immediate Process Failure
The moment the host file system reports that no space is left on the
device, unrar stops the extraction routine. It prints a
standard write error message to the terminal (typically
Write error: disk full or
No space left on device) and exits with a non-zero exit
code indicating a fatal I/O failure. It does not pause to wait for space
to clear; it terminates execution immediately.
Condition of the Target Files
The state of the destination directory depends on which stage of the archive was being processed:
- Previously extracted files: Any files that finished extracting prior to the error remain intact, fully written, and valid on the storage drive.
- The active file: The specific file being written at
the exact moment the drive filled up is left in a truncated, incomplete
state. Because
unrarwas forced to stop writing data mid-stream, this file will fail integrity checks and is typically corrupted or unreadable. - Remaining files: Any files scheduled to be extracted after the failed file are completely skipped and will not appear in the destination folder.
Integrity of the Source Archive
The original RAR file (or split multi-part RAR volumes) remains completely safe and untouched. The extraction process is strictly a read operation on the source archive. Running out of disk space affects only the target destination, meaning the archive itself is not corrupted by the interrupted extraction.
How to Resolve and Resume Extraction
To complete the extraction successfully:
- Free up disk space: Delete unnecessary files or empty the recycle bin on the destination drive to create enough room for the uncompressed data.
- Delete the truncated file: Manually remove the partially extracted file to prevent conflict or accidental use of corrupted data.
- Re-run the extraction: Run
unrar x <archive.rar>again. Use the-o+switch to automatically overwrite previously extracted files, or use-o-to skip files that were already fully extracted in the previous attempt, saving time and disk writes. - Extract to a different location: If the primary
drive lacks capacity, specify an alternative drive or external storage
path using
unrar x <archive.rar> /path/to/larger/drive/.