My uploads folder on my site is beginning to get big (and my host's disk space limit is fast approaching) so I was wondering if there was a way to delete uploaded images which aren't used in posts or as avatars.
I'm planning to build a script to do this but before I do I thought I'd ask if someone else hasn't already done something similar?

My plan is to search through the tblThead.Message field pulling out all "<img>" tags and storing the paths in an array (or possibly a temp db table). (The same would be done for avatars.)
Next it would get the images (an paths) stored in the "/uploads/" folder.
Then it would cross check the two deleting those which aren't used in the DB (i.e. in posts & avatars).
The above script could potentially be quite intensive all round - I'm not sure how much so, maybe others can comment. If nothing like this exists I'll start on it and do some testing.