You maybe thinking of <RC root>/bin/cleandb.sh it will remove contacts, contactgroups, and identities that have been deleted. I don't think you need to run it periodically but it could be used if you need to shrink the size of your database and have a large number of deleted records.