delete_patrons - This script deletes patrons


delete_patrons.pl [-h|--help] [-v|--verbose] [-c|--confirm] [--not_borrowed_since=DATE] [--expired_before=DATE] [--last-seen=DATE] [--category_code=CAT] [--library=LIBRARY] [--file=FILE]

Dates should be in ISO format, e.g., 2013-07-19, and can be generated with `date -d '-3 month' --iso-8601`.

The options to select the patron records to delete are cumulative. For example, supplying both --expired_before and --library specifies that that patron records must meet both conditions to be selected for deletion.



Print a brief help message


Delete patrons who have not borrowed since this date.


Delete patrons with an account expired before this date.


Delete patrons who have not been connected since this date.

The system preference TrackLastPatronActivity must be enabled to use this option.


Delete patrons who have this category code.


Delete patrons in this library.


Delete patrons whose borrower numbers are in this file. If other criteria are defined it will only delete those in the file that match those criteria.


This flag must be provided in order for the script to actually delete patron records. If it is not supplied, the script will only report on the patron records it would have deleted.


Verbose mode.


Jonathan Druart <jonathan.druart@biblibre.com>


Copyright 2013 BibLibre


This file is part of Koha.

# Koha is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3 of the License, or # (at your option) any later version. # # Koha is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with Koha; if not, see <http://www.gnu.org/licenses>.