To comply with data retention regulations (as well as save themselves time), library teams want to delete inactive patron accounts automatically. They can do this using the delete_patrons.pl script. The script does not delete patrons that have: 1) items on loan; 2) money owing; 3) money in credit; 4) guarantees attached. 1) can be dealt with using longoverdue.pl and 2) with writeoff_debts.pl. However, there is nothing to write off credits as in 3). It would be useful to have a script similar to writeoff_debts.pl but for credits.