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.