How to fix "unexpected end of file / tar: Unexpected EOF in archive" in Linux, macOS, 7-Zip
gzip: stdin: unexpected end of file / tar: Unexpected EOF in archive
What this error means
The archive is cut short.
Why it happens
- Download or upload stopped early
- Disk full while creating a backup
How to fix it
- Extract what you can: gunzip -c file.tar.gz | tar xvf -
- Upload it here to get a clean archive of every complete file
About TAR.GZ archive files
A .tar.gz is a tarball (files one after another) compressed with gzip. If the compressed stream is cut or damaged, everything before the damage can still be decompressed and every complete file inside kept.