Marqqs
8
As stephan75 wrote above, osmfilter might be useful for this purpose. You also could use Osmosis for filtering. An osmfilter example:
osmconvert my_osm_file.pbf -o=my_osm_file.o5m
osmfilter my_osm_file.o5m --keep="highway=motorway" -o=motorways.osm