Moved to the scripting forum...
What do you mean as "duplicated styles"?
- the same properties & different names
- the same properties & the same names (similar, cloned)
- any mixed scenario?
Just a little warning to be careful about consolidating styles the "look like" they are duplicates. There are a lot of vaild reasons for having multiple styles that seem to have exactly the same definitions, among them for use in cyclical "next style" loops (here the Next Style would not match), or used for things like picking up text for running headers or TOC entries (where definitions might be exactly the same except for the name).
Thanks everyone for the input. In this case, there seems to be a lot of unused styles in each file of the book. Based on the very different names, I'm fairly certain they are totally unused and have been replaced by other styles. However, I won't start deleting styles without making a backup of the entire project first.
If they haven't been used they would be selectable with the select unused styles command and could be safely deleted. If not selectable, you need to be VERY careful about replacing them.