def _cleanup_old_backups(self, database):
        """
        Cleanup old backups, keeping the number of backups specified by
        DBBACKUP_CLEANUP_KEEP and any backups that occur on first of the month.
        """
        self.logger.info("Cleaning Old Backups for: %s", database['NAME'])
        filepaths = self.storage.list_directory()
        filepaths = self.dbcommands.filter_filepaths(filepaths)
        for filepath in sorted(filepaths[0:-self.clean_keep]):
            regex = r'^%s' % self.dbcommands.filename_match(self.servername, '(.*?)')
            datestr = re.findall(regex, os.path.basename(filepath))[0]
            dateTime = datetime.strptime(datestr, dbbackup_settings.DATE_FORMAT)
            if int(dateTime.strftime("%d")) != 1:
                if not self.quiet:
                    self.logger.info("Deleting: %s", filepath)
                self.storage.delete_file(filepath)

    # TODO: Define chunk size
dataset/ETHPy150Open django-dbbackup/django-dbbackup/dbbackup/management/commands/dbbackup.py/Command._cleanup_old_backups/original