What Does the DB Prune Function Really Prune?

I see in scheduler the DB prune function is enabled. I can see looking at case records it is working. But when I query the tasks table there’s deleted tasks going back years! I assume they are tasks associated with case records that are not deleted but the tasks were deleted.

Seems odd to me the prune function doesn’t delete all records with deleted=1 in all tables!

It does prune all tables for all records with deleted=1, as far as I can tell:

→ https://github.com/salesagility/SuiteCRM/blob/master/modules/Schedulers/_AddJobsHere.php#L306-L316