I gave @Kyle Sevenoaks +1 for his answer, since Dust Me Selectors is a very good tool.
However, I would like to add a few points (more than I could fit in a comment, therefore, writing this as an answer):
Even if you have results from Dust Me, you still have to be very smart when viewing results, as they can give false positives and false negatives:
False positives can occur when a selector is specified in your CSS but is not used on the current page. But keep in mind that it can still be used on other pages of the site, so do not just run it on your home page and expect to get the final results; you need to test every page of your site and combine the results.
Also, if you have any Javascript code that adds elements to the page at runtime or changes the class name, they can select CSS selectors that are not used when the page loads first.
False negatives can occur if the selector is used on the page, but is nonetheless redundant because it is always overridden. Sites like the ones you describe are mature candidates for things like this, where a new style was added later for something without deleting the old styles. I donβt know if Dust Me can choose such things, but they can certainly seem difficult, because again you need to be sure that they are really not used in this context or in any other context.
So my message would be that an automated tool is a good idea, and I definitely recommend Dust Me, but don't rely on it.
Spudley
source share