It is pretty easy to delete only some certain websites from your browser’s history.
First thing to do is to know what websites you want to delete, either the url or their title.
After a few seconds, all the websites related to “yahoo” and also all the pages that you have visited from “yahoo.com” will appear.
Now right click on the first result and click on “delete this page”.
Now what you need to do is to keep the “delete” button pressed (from your keyboard). You will notice that the pages from your list will start to get deleted. If you have thousands of pages, it might even take a few minutes.
If you own a Razer product (keyboard or mouse), you can create a macro for deleting but if you don’t, just keep the “delete” button pressed until you have deleted all the pages.
This works for Firefox but I guess it works the same for Internet Explorer and Google Chrome.