The current OWLOntologyManager.removeOntology(OWLOntology) method requires the ontology to be present, but internally OWLOntologyManagerImpl only checks on the ontologyID being present.
This patch introduces a new method to the OWLOntologyManager interface that only requires an ontologyID, which is much easier to get or create than an OWLOntology instance.
See a patch for this at:
https://github.com/ansell/owlapi/compare/master...SF-3578003
This has been implemented and will be merged soon