Answers.Body: <p>Both of the stowaway epubs are probably also linked inside the OPF file and/or NCX file to the existing Epub you are now viewing and will need de-linked somehow (either automatically with EpubSplit plugin, or manually by viewing the code in Calibre editor). Try initially by using the Calibre EpubSplit plugin tool to extract those epubs. Here are several links that should help get you there.<br />
  <a href="https://www.epubor.com/how-to-split-an-epub-file.html" rel="nofollow noreferrer">Epubor link</a></p>
  <p><a href="https://ebooks.stackexchange.com/questions/1069/how-can-i-extract-some-chapters-or-sections-from-an-ebook-into-a-new-one">ESE link</a></p>
  <p>Since I mentioned 'manual method' here it is as well (so others reading this forum can choose which direction to process it).
  Using 7-zip software (or similar utility tool) open that software to its main section.
  At top left is a list of options (file, edit, etc).
  Click on: View &gt; 2 panels.
  In the right panel go to the epub and change the extension to .zip extension.
  Double click to get inside of it and drag both the stowaway epubs over into the left panel (that should be in your 'Documents' or similar folder zone).
  Then delete both stowaway epubs (from your primary epub).
  Then change that primary epub from .zip back to .epub extension.
  After all that ... you might want to open it in Calibre to verify that the epub will function properly (as it may need to have some of the OPF / NCX files updated/altered (which can be done in Calibre).</p>
  <p>Welcome to ESE.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2023-10-01T17:24:14.530Z
Answers.Text: Thank you! I assume "delete this file" followed by "automatically fix all fixable bugs" in the Calibre editor is an appropriate way to de-link them?
Answers.UserDisplayName: Stef
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2023-10-01T17:24:52.307Z
Answers.Text: After careful inspection it looks like these two stowaway epubs are present in several ebooks in my collection, I don't know if this is due to a wrong manipulation that I would have made or if I've received them this way (these are ebooks that I haven't read yet but that I've had for several years). So now I'm inspecting all ebooks in my collection that are approximately 5MB.
Answers.UserDisplayName: Stef
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2023-10-02T01:13:59.460Z
Answers.Text: Yes remove extra stowaways using Calibre editor, or via a manual method (using 7zip software or similar tool). 
  Calibre editor > right click > 'delete selected' stowaway epubs entire folder. Use the 'revert to' button if you err somewhere.
Answers.UserDisplayName: granite
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2023-10-01T16:42:40.610Z
Answers.LastActivityDate: 2023-10-02T00:40:08.927Z
Answers.LastEditDate: 2023-10-02T00:40:08.927Z
Answers.UserDisplayName: granite
Body: <p>I have an epub file which weighs 5.4 MB, and I looked at the files inside using Calibre's &quot;Edit Ebook&quot; feature.</p>
  <p>I noticed the following weird thing: among the files inside the ebook are two .epub files.</p>
  <p><a href="https://i.sstatic.net/lNXG7.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/lNXG7.png" alt="View of nested files within ebook" /></a></p>
  <p><em>Screenshot of Calibre's file browser revealing two hidden epub files nested inside the ebook</em></p>
  <p>This is the first time that I've been faced with an epub inside an epub.</p>
  <p>These two extra epub files inside the ebook appear to be completely different books, by other authors and unrelated to the first book. When I run Calibre's &quot;Check book for bugs&quot;, the two extra epub are flagged with the following warnings:</p>
  <blockquote>
  <p>The file OEBPS/Misc/Alice_Kellen_-<em>23_automnes_avant_toi__Te_retrouver</em>.epub has its MIME type specified as text/plain in the OPF file. The recommended MIME type for files with the extension &quot;epub&quot; is application/epub+zip. You should change either the file extension or the MIME type in the OPF.</p>
  </blockquote>
  <p>It looks like Calibre is confused by the presence of an epub file inside another epub file and doesn't know what to do with it.</p>
  <p>The two nested epub files weigh 0.7 MB and 4.2 MB respectively, so in particular the second one appears to be singlehandedly responsible for most of the overall weight.</p>
  <p>I'm guessing my best course of action would be to extract these two epub files and add them to Calibre Library separately, so that I'd have three ebooks in total, rather than one ebook which contains two hidden nested .epub files.</p>
  <p>What is the easiest way to extract these two epub files? I have two goals here:</p>
  <ul>
  <li>Making the original ebook lighter by removing these two &quot;stowaway&quot; files from it;</li>
  <li>Being able to read these two new ebooks in case I might find them interesting.</li>
  </ul>
  
Tags: <epub>
Title: Extra epub file inside an epub ebook?
UserDisplayName: Stef
ThreadText: # Extra epub file inside an epub ebook?
  
  (Asked by: username_0 on 2023-10-01)
  
  I have an epub file which weighs 5.4 MB, and I looked at the files inside using Calibre's "Edit Ebook" feature.
  
  I noticed the following weird thing: among the files inside the ebook are two .epub files.
  
  [![View of nested files within ebook](https://i.sstatic.net/lNXG7.png)](https://i.sstatic.net/lNXG7.png)
  
  *Screenshot of Calibre's file browser revealing two hidden epub files nested inside the ebook*
  
  This is the first time that I've been faced with an epub inside an epub.
  
  These two extra epub files inside the ebook appear to be completely different books, by other authors and unrelated to the first book. When I run Calibre's "Check book for bugs", the two extra epub are flagged with the following warnings:
  
  > The file OEBPS/Misc/Alice\_Kellen\_-*23\_automnes\_avant\_toi\_\_Te\_retrouver*.epub has its MIME type specified as text/plain in the OPF file. The recommended MIME type for files with the extension "epub" is application/epub+zip. You should change either the file extension or the MIME type in the OPF.
  
  It looks like Calibre is confused by the presence of an epub file inside another epub file and doesn't know what to do with it.
  
  The two nested epub files weigh 0.7 MB and 4.2 MB respectively, so in particular the second one appears to be singlehandedly responsible for most of the overall weight.
  
  I'm guessing my best course of action would be to extract these two epub files and add them to Calibre Library separately, so that I'd have three ebooks in total, rather than one ebook which contains two hidden nested .epub files.
  
  What is the easiest way to extract these two epub files? I have two goals here:
  
  * Making the original ebook lighter by removing these two "stowaway" files from it;
  * Being able to read these two new ebooks in case I might find them interesting.
  
  **Tags:** epub
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2023-10-01. Score: 2 | Accepted answer
  
  Both of the stowaway epubs are probably also linked inside the OPF file and/or NCX file to the existing Epub you are now viewing and will need de-linked somehow (either automatically with EpubSplit plugin, or manually by viewing the code in Calibre editor). Try initially by using the Calibre EpubSplit plugin tool to extract those epubs. Here are several links that should help get you there.  
  [Epubor link](https://www.epubor.com/how-to-split-an-epub-file.html)
  
  [ESE link](https://ebooks.stackexchange.com/questions/1069/how-can-i-extract-some-chapters-or-sections-from-an-ebook-into-a-new-one)
  
  Since I mentioned 'manual method' here it is as well (so others reading this forum can choose which direction to process it).
  Using 7-zip software (or similar utility tool) open that software to its main section.
  At top left is a list of options (file, edit, etc).
  Click on: View > 2 panels.
  In the right panel go to the epub and change the extension to .zip extension.
  Double click to get inside of it and drag both the stowaway epubs over into the left panel (that should be in your 'Documents' or similar folder zone).
  Then delete both stowaway epubs (from your primary epub).
  Then change that primary epub from .zip back to .epub extension.
  After all that ... you might want to open it in Calibre to verify that the epub will function properly (as it may need to have some of the OPF / NCX files updated/altered (which can be done in Calibre).
  
  Welcome to ESE.
  
  > **Comments:**
  > **username_0**: Thank you! I assume "delete this file" followed by "automatically fix all fixable bugs" in the Calibre editor is an appropriate way to de-link them?  
  > **username_0**: After careful inspection it looks like these two stowaway epubs are present in several ebooks in my collection, I don't know if this is due to a wrong manipulation that I would have made or if I've received them this way (these are ebooks that I haven't read yet but that I've had for several years). So now I'm inspecting all ebooks in my collection that are approximately 5MB.  
  > **username_1**: Yes remove extra stowaways using Calibre editor, or via a manual method (using 7zip software or similar tool).  Calibre editor > right click > 'delete selected' stowaway epubs entire folder. Use the 'revert to' button if you err somewhere.  
  
  ---
  
  