Garbage in uploads folder

The easiest way would probably be:

1) perform a WordPress XML export ( Dashboard -> Tools -> Export )

2) import into a clean WordPress install ( Dashboard -> Tools -> Import )

At this point, everything in the /uploads directory of the clean install is attached. You can now:

3) backup/delete your original /uploads directory

4) copy over the /uploads directory from the clean install