As you will see if you run your pptx through PartsList, slides are referenced in presentation.xml
Using xml Syntax Highlighting
<p:presentation>
<p:sldIdLst>
<p:sldId id="256" r:id="rId2"/>
<p:sldId id="257" r:id="rId3"/>
</p:sldIdLst>
Parsed in 0.001 seconds, using
GeSHi 1.0.8.4
so you need to remove the relevant p:sldId entry, and the corresponding relationship from MainPresentationPart's relationship part.
Part /ppt/presentation.xml is class org.docx4j.openpackaging.parts.PresentationML.MainPresentationPart containing JaxbElement org.pptx4j.pml.Presentation
The removePart method works recursively, which is probably what you want for a docx, but isn't for a pptx (since slides reference a layout which in turn references a master, which then references all layouts, and you won't want to delete all of them).
So instead, use the lower level removeRelationship method, and remove the actual part, as you have done.
So, in outline:
Using java Syntax Highlighting
MainPresentationPart presentation
= presentationMLPackage.
getMainPresentationPart();
// First, delete the slide
SldIdLst sldIdLst
= presentation.
getJaxbElement().
getSldIdLst();
// .. etc
// Second, delete the rel
RelationshipsPart rels
= presentation.
getRelationshipsPart();
rels.
removeRelationship // etc
// Also, delete the specified part from the package.
getPackage
().
getParts().
remove(partName
);
Parsed in 0.014 seconds, using
GeSHi 1.0.8.4