Manual:DeleteOldRevisions.php

A script.

This script: "Delete old (non-current) revisions from the database" (according to the source code)

This script deletes page histories. If you run a GFDL licensed wiki you need to be aware that the GFDL requires you to keep the page histories.

Remember to use the --delete flag to confirm that you want to delete the items matched. Else it will only display the number of items that it can delete.