A script to clean up old etherpads:
#!/usr/bin/perl

use LWP::Simple;
use JSON;
use URI::Encode qw(uri_encode uri_decode);
use strict;

my $apikey = "?apikey=VERYLONGSECRETTHATYOUCANFINDINTHEAPIKEYTXTFILEINYOURETHERPADINSTALL";
my $host = "http://localhost:9001/api/1.2.13/";
my $period = 300 * 24 * 60 * 60 * 1000; // 300 days

my $json_data = decode_json get($host . "listAllPads" . $apikey);

my $pads = $json_data->{data}->{padIDs};

foreach my $pad (@{$pads}) {
        $pad = uri_encode($pad);
        my $lastaccess = decode_json get($host . "getLastEdited" . $apikey . "&padID=" . $pad);
        $lastaccess = time()*1000 - $lastaccess->{data}->{lastEdited};
        if($lastaccess > $period){
                print "DELETING: \n";
                print $pad . "\n";
                print $lastaccess . "\n";
                print get($host . "deletePad" . $apikey . "&padID=" . $pad) . "\n\n";
        }
}