i'm completely with the OP here, this would be a handy script for anyone who wants to tidy up their indesign files, and i'd go several steps further to add the following options:
* change all registration type and fills to 100% K (when authors click the colour by mistake and don't see it in their seps)
* remove all unused layers
* add unnamed colors
* make RGB swatches CMYK
* remove unused images from pasteboard (not textboxes in case it is threaded to text used on a page… could be a disaster)
i have seen some scripts that do the above tasks (dave saunders has one to make RGB to CMYK but it makes R0G0B0 become C75M68Y67K90 instead of 100K) and Dirk Becker wrote one to delete all unused colors.
I did try the script from the above poster but it had trouble with CS4 unless i put the script into “version 4.0 scripts” folder and then it worked fine, don't know if it works under CS5.
but i'm absolutely with the OP on this, it'd be nice to have one script which would do the job, or a menu item such as “tidy up loose ends” (which could be made into a KBSC).