since there is no automatic repository cleanup function in vRanger, I am looking for a script which deletes all backups excepting one full backup and the last differential backup.
Look for latest reposync. One of the options is to delete backups older than defined date. Not exactly what you are looking for, but something.
Personally, I would recommend to find the reason why some savepoints are left unaccounted and retention does not work against them. There should be few posts related to this 'problem' and good explanation. For example, "inconsistency on My Repo screen" (www.quest.com/.../inconsistency-on-my-repository-screen-orphaned-savepoints)