in reply to Removing Multiple Image Files
Maybe something like this?
unlink glob "$photodir/$category_id_number/*$id*"; [download]
(adjust the glob pattern as needed)