I'm guessing you could use something like:
http://code.xwiki.org/xwiki/bin/view/Snippets/DeleteSpaceSnippet
to build a listing of the files versions and then create links or checkboxes
or something like that to delete the ones you are interested in.
You can get the full list of versions using
If what you want to do is remove all old revisions from a document but
keep the current one, you can use the following :
$doc.document.resetArchive($context.context);
It's not a public API, so you will need to save the page with a users
who has the programming right granted
Hopes it helps,