Delete All But Filtered Data

Another question now that I have my filter figured out.

Is there a way, to delete all detail in a selection other that the filtered criteria.
I have downloaded all data from OSM into JOSM, 500 metres from the road. It has a river in that downloaded area for which I want to filter exclusively so that I have a layer of just that river (nothing to unhide). To do that I need to delete everything else, like the roads, buildings and other keys.

Filters can be inverted with the I column checkbox. See here for more detail:
Help/Dialog/Filter – JOSM. Once inverted, only the data you don’t want will be active. Then you can select all and delete.

1 Like

Thank you.