When does Jenkins clean up old builds?
Per the Jenkins documentation:


  Cleanup per project/job is performed after that job runs.
  
  As of v2.221, cleanup will also periodically run using the new Global Build Discarders (even if a job has not recently been run).


Source.