bulk deleting empty items in the media library

Since I didn’t expected an answer to this question I tried it with wp_delete_attachment();.
I wrote this function on a random page of my site (since the site isn’t live yet) and executed it from there.

$attac_kill_ids = range(1235, 22686); //fill an array with the post_ids from the empty instances                    
foreach( $attac_kill_ids as $kill_id ){
    $kill_post = get_post( $kill_id );
    if( $kill_post ) {
        wp_delete_attachment( $kill_id, true );
        echo '<br />killed #' . $kill_id;
    }
    else continue;
}

delete‘ would be more precise, but ‘kill‘ sounds more dangerous and keeps me concentrated thereby.

Then I used this line in phpMyAdmin to set the ID-counter back to 810

ALTER TABLE wp_posts AUTO_INCREMENT=810