If this is a single file, the easiest way would be to use ReSharper (you can get a free trial). ReSharper does a pretty good job of understanding when things are not being used and unload them. You can collapse the document and then expand only the root nodes and just delete the ones that are grayed out.
Without ReSharper, this is a little trickier. You can go through and find everything in the solution for each Keyed resource and unlock those that are not found. For implicit resources without keys, it will be a little harder to define (I don't think R # can handle this well)
source share