I've found that my attachment templates are inheriting the enqueued scripts for single posts. My first instinct was to unenqueue these scripts one-by-one or to do an is_attachment() check before enqueueing them at all.
It strikes me that a more robust way to do this might be to simply be to remove any and all enqueued scripts for that page type; that way, I don't have to update code in multiple places if I add or remove an enqueued script in the future.
Offhand I can't find a way to do this. What's a good way to unenqueue all scripts for just a single page?
$wp_scriptsglobal but I'm worried I'm going to unenqueue scripts on more than just the current page. – editor Feb 21 '11 at 20:42