I don't know a utility that douse this. But I know a way around to remove the games in a database with opening lines that are not played a specified percentage of frequency. With a tool MakeBook to build obk books from pgn databases and a tool obk2pgn. But there is a problem with lines with underpromotion because the obk book format douse not support underpromotions.
There must be better ways to do this. I hope someone can build a better tool. Or I like to know it to if such a tool already exists.