I'm using osmium-tool to create OSM history extracts, and then import then into Postgres using osm2po. This is causing problems when the ways do not have referential integrity (i.e., some nodes are missing from some ways). After the osm2po import, the missing nodes are placed at lat, lon ~(215,215).

I can see the likely problem in osmium. Running

osmium check-refs tmpExtract_DEU_0.6.osm.pbf

yields:

There are 10668502 nodes, 1647384 ways, and 0 relations in this file. Nodes in ways missing: 116607

I'm happy to drop the ways that have missing nodes, but I don't see a way to do this in osmium. Is there any way to clean the osm file and ensure referential integrity?