Activating the 'Discard Old Builds' checkbox on a job allows an Advanced option to specify 'Max # of builds to keep with artifacts'.
This does not seem to clean up the artifacts for my builds anymore.
I have tested 1.502, 1.503, 1.504 up to 1.510. It works fine in 1.502 but in none of the later versions.
The artifacts I refer to are archived with the default archiving mechanism (not the archiving that can be configured as a post-step).