Manual:Pywikibot/delete.py

This script can be used to delete and undelete pages en masse. You will need an admin account on the relevant wiki. Also add: delete everything

to, where   is the name of the the family in which you are working on, and   is the username.

Syntax:

Arguments

 * -page:      Delete specified page
 * -ref:       Delete all pages referring from a given page.
 * -images:    Delete all images used on a given page.
 * -cat:       Delete all pages in the given category.
 * -links:     Delete all pages linked from a given page.
 * -always     Don't prompt to delete pages, just do it.
 * -summary:   Supply a custom edit summary.
 * -undelete:  Actually undelete pages instead of deleting. Works only with -page and -file.
 * -file:      Delete all pages listed in a given text file.  The list should be of the format

Examples

 * Delete everything in the category "To delete" without prompting.


 * Delete everything in the pages linked to the page, without prompting.


 * Delete everything in the speedy deletion category on the English Wikibooks.


 * Delete pages inside a text file:

The format of the text file should be as the following:


 * 1) Main Page
 * 2) Talk:Main Page


 * Restore pages: