I've been given the directive to "retire" about 1000 articles from a wordpress site I maintain. Deleting the posts from the DB is trivial, but how would one go about deleting the orphaned files from the uploads folder?
take a look at Upload Janitor plugin. its a plugin i use to clean up unused images and other files from your uploads folder.
but just in case make a backup of your uploads directory first