Upload scan
Use this after manual zipping or repackaging.
The report can tell whether mimetype is missing, compressed, not first, or hidden under an extra parent folder.
EPUB error guide
How PKG_006 happens when the EPUB ZIP wrapper has a missing, compressed, or misplaced mimetype entry, and when rebuilding the archive is safe.
1. Example report output
The report should focus on the ZIP wrapper first: whether mimetype exists, where it appears, and whether it was compressed.
EPUBCheck message
ERROR(PKG-006): Mimetype file entry is missing or is not the first file in the archive.
KDP / Previewer wording
The EPUB package or ZIP container is invalid.
EPUB Fixer report
First ZIP entry is META-INF/container.xml; expected root-level mimetype stored without compression.
Do this next
Rebuild the ZIP only if mimetype, META-INF/container.xml, OPF, and book files are otherwise intact.
Do not do this
Do not rename an arbitrary ZIP to .epub unless the root entries and mimetype storage are correct.
If container.xml, the OPF file, or core content files are missing too, fix the package layout before treating this as a simple ZIP rebuild.
2. Next step
PKG_006 is often safe, but only when the EPUB files are at the right level and the problem is the ZIP order or compression mode.
Upload scan
The report can tell whether mimetype is missing, compressed, not first, or hidden under an extra parent folder.
Manual check
Open the ZIP layout and confirm mimetype, META-INF, and the OPF package are at the expected root-level paths.
Formatter handoff
A ZIP-order rebuild cannot restore missing OPF files, encrypted files, or book content that was never packaged.
3. Concrete path example
The EPUB can contain valid chapters and still fail if the ZIP starts with the wrong file.
Message: ERROR(PKG-006): mimetype file entry is missing or not first Wrong order: 1. META-INF/container.xml 2. mimetype Correct order: 1. mimetype (stored, uncompressed) 2. META-INF/container.xml 3. OEBPS/content.opf
After rebuilding the wrapper, run validation again because deeper OPF or resource errors may appear next.
Quick decision
Do not rewrite chapters or metadata until you know whether the archive simply has the wrong first entry or a deeper package problem.
Scan first
Scan the file to confirm whether mimetype is missing, compressed, not first, or nested under an extra folder.
Safe fix
Rebuild the archive with mimetype first, uncompressed, then add META-INF, OPF, XHTML, images, CSS, fonts, and other resources.
Stop
A ZIP rebuild cannot fix a missing OPF, missing container.xml, encrypted content, or a nested package that needs repackaging.
Start here
PKG_006 usually means the EPUB was repacked incorrectly. The chapters may be fine, but the archive has to start with a root-level, uncompressed mimetype file.
An EPUB is a ZIP file with strict packaging rules. The mimetype entry must be at the archive root, must be the first entry, and must be stored without compression.
This can usually be fixed by rebuilding the EPUB ZIP container with mimetype first and uncompressed, then adding the rest of the package files after it.
Open the EPUB as a ZIP package and check whether a file named mimetype exists at the root level.
If the archive is corrupted, encrypted, nested under an extra parent folder, or missing core package files, rebuilding the ZIP order alone is not enough.
Common situations
PKG_006 is narrow, but it can hide several different packaging mistakes.
The EPUB has no root-level file named mimetype, even if the rest of the book files are present.
Add a root mimetype file with application/epub+zip only as part of a correct EPUB rebuild.
Generic archive tools may place META-INF or OEBPS before mimetype.
Rebuild the ZIP so mimetype is written first.
The file can be first and still fail if it was deflated instead of stored.
Store mimetype without compression, then compress the rest of the EPUB normally.
Everything may sit under one parent folder, so mimetype is not at the archive root.
Repackage from inside the book folder and recheck container.xml and the OPF path.
The file can be first and uncompressed but still fail if its content is not exactly application/epub+zip.
Rewrite the mimetype file as plain text with no extra whitespace, then rebuild and validate again.
PKG_006: Mimetype file entry is missing or is not the first file in the archive.
EPUBCheck, Kindle Previewer, or KDP can see that the upload is an EPUB-like archive, but the ZIP entries are not arranged the way EPUB requires.
What it means
An EPUB is a ZIP file with strict packaging rules. The mimetype entry must be at the archive root, must be the first entry, and must be stored without compression.
This usually happens after manually zipping a folder, using a generic archive tool, dragging files into an existing archive, or re-exporting from a tool that changed package order. The book files can all be present while the ZIP wrapper is still invalid.
Before you edit
Do not start by rewriting OPF metadata or chapters. First verify whether the archive order and compression mode satisfy the EPUB container rule.
Why KDP checks it
The EPUB ZIP wrapper must point readers to the OPF file through META-INF/container.xml and keep packaged resources at the paths the book references.
EPUBCheck checks EPUB 2 and EPUB 3 files against the official rules and reports package, markup, link, and file-reference problems.
Can this be fixed safely?
This can usually be fixed by rebuilding the EPUB ZIP container with mimetype first and uncompressed, then adding the rest of the package files after it.
If the archive is corrupted, encrypted, nested under an extra parent folder, or missing core package files, rebuilding the ZIP order alone is not enough.
Before: mimetype is missing, compressed, or appears after META-INF/container.xml. After: mimetype is the first root entry, stored without compression, and contains application/epub+zip exactly.
Ready to retry?
The scan can confirm whether this is only a container-order problem or whether the same file is also missing container.xml, the OPF package, or required resources.
Upload EPUB to scanFAQ
It means the EPUB ZIP container was packaged in the wrong order or without the required root-level mimetype file. EPUB rules require the mimetype entry to be first and uncompressed.
Yes, if the rest of the EPUB package is intact. The usual fix is to rebuild the archive with mimetype first, stored without compression, then run EPUBCheck again.
Generic ZIP tools often put files in the wrong order or compress the mimetype entry. EPUB packaging rules require mimetype to be the first ZIP entry and stored uncompressed.
Not necessarily. PKG_006 is usually about the ZIP wrapper around the EPUB. The content can be present while the mimetype entry is missing, compressed, or not first.
Only if the ZIP was built with the EPUB rules. Renaming a generic ZIP file does not make mimetype first or uncompressed.
Check that META-INF/container.xml and the OPF file are still at the expected paths, then run EPUBCheck again. PKG_006 can hide deeper package errors until the ZIP wrapper is fixed.