# EPUBCheck OPF-002: package document not found, how to fix it

Source: https://epubcc.com/epubcheck/opf-002/ (updated 2026-11-04)

EPUBCheck OPF-002 is a fatal error message: “The OPF file "…" was not found in the EPUB.” The package document named in META-INF/container.xml is not in the archive. EPUBCheck stops there, because the package document lists every other file, so nothing else in the book can be checked until it is found.

- Official message (EPUBCheck 5.4.0): The OPF file "%1$s" was not found in the EPUB.
- Default severity: Fatal error

## Typical causes

- A full-path in container.xml that does not match the real path of the .opf file, often a difference in upper or lower case.
- The .opf file was renamed or moved to another folder after container.xml was written.
- The .opf file was left out when the folder was zipped.

## How to fix it

1. Open META-INF/container.xml and read the full-path attribute of the rootfile element.
2. Compare it with the real location of the .opf file inside the archive, letter by letter: paths in an EPUB are case-sensitive.
3. Correct full-path (or move the file) so they match, then rebuild the EPUB.

## When it's not this

If container.xml itself is missing, EPUBCheck reports RSC-002 instead.

## Sources

- EPUB 3.3, §4.2.6.3.1.3 The rootfile element: https://www.w3.org/TR/epub-33/#sec-container.xml-rootfile-elem (read 2026-11-04)

Message text and severity: EPUBCheck (W3C, BSD-3-Clause). Explanation: EpubCC.
